Is it possible to craft a message at runtime and send it to an object in objective-c on iOS?
Let’s say I have an instance of class
Foo
I want to be able to use something like
NSString * d = @"action1:";
[myFoo d];
d = @"action2:";
[myFoo d];
and Foo has at least two instant methods:
-(void) action1:(id)sender;
-(void) action2:(id)sender;
There are a number of different
performSelectormethods onNSObject. You can call with no params, with delays, etc.