I'm just wondering if there is a way to call a method when I build the method name on the fly with a string.
eg. I have a loaddata method p>
-(void)loadData;
to call it, I usually call it like
[self loadData]
But I want to be able to dynamically call it with a string, for example.
NSString *methodName = [[NSString alloc] initWithString:@"loadData"]; [self methodName];
This is a stupid example, but I hope you understand my point. I use it for the data binding classes that I configure for my iPad application. It's hard to explain, but in order to run it, I need to figure out how to call the method with a string.
Any ideas?
thank
methods dynamic objective-c iphone messaging
IPadHackAndSlash Dec 15 '10 at 5:05 2010-12-15 05:05
source share