I want to write something like this:
- (int)someMethod:(SEL)theSelector {
NSObjet *i = func(...);
i = theSelector(i); //replace this
i = func2(...);
return i;
}
So I have some constant functions I know and can simply write. I also have an undefined function which I should pass as a param.
I can't use constructions like performSelector:
because they are even performed in another NSRunLoop cycle.
And I can't pass blocks to this function because of specific code.
How to solve this issue? It seems objc_msgSend
may help but I don't know how to use it correctly.