How can I call a selector with its name in NSString * in objective c? I also need to call the selector only if the target will accept it. e.g.
+(void) callMethod: (NSString *) method onObject: (id) object
{
// do some magic
}
When I call callMethod: @"Foo" onObject: obj if obj implements Foo then [obj Foo] should be called, if it doesn't implement it, nothing should happen.