I\'m getting the following warning by the ARC compiler:
\"performSelector may cause a leak because its selector is unknown\".
Here\'s what
This code doesn't involve compiler flags or direct runtime calls:
SEL selector = @selector(zeroArgumentMethod);
NSMethodSignature *methodSig = [[self class] instanceMethodSignatureForSelector:selector];
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSig];
[invocation setSelector:selector];
[invocation setTarget:self];
[invocation invoke];
NSInvocation
allows multiple arguments to be set so unlike performSelector
this will work on any method.