In another question ( how to instantiate an object of class from string in Objective-C? ), this was suggested:
id myclass = [[NSClassFromString(@"MyClass") alloc] init];
[myclass FunctioninClass];
However, [myClass FunctioninClass]
yields an error because the compiler has no idea if FunctioninClass
exists.
I do know the classes that can be there are all descendants of one parent. And that parent has the prototype of the method I want to call, except I want to call the overridden descendant method. Does that suggest a solution?