How can I prevent this warning with a variable selector name?
NSString *methodName;
SEL method = NSSelectorFromString(methodName);
if ([self respondsToSelector:method]) {
if ([methodName hasSuffix:@":"])
[self method:dict];
else
[self method];
}
Use
[self performSelector:method];
Instead of
[self method];
And
[self performSelector:method withObject:dict];
Instead of
[self method:dict];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With