I\'m getting the following warning by the ARC compiler:
\"performSelector may cause a leak because its selector is unknown\".
Here\'s what
If you don't need to pass any arguments an easy workaround is to use valueForKeyPath
. This is even possible on a Class
object.
NSString *colorName = @"brightPinkColor";
id uicolor = [UIColor class];
if ([uicolor respondsToSelector:NSSelectorFromString(colorName)]){
UIColor *brightPink = [uicolor valueForKeyPath:colorName];
...
}