I have created a UIActionSheet
UIActionSheet * action = [[UIActionSheet alloc]initWithTitle:@\"\"
I've read the accepted answer and it is awfully DANGEROUS. you should never suppress such warnings in order to shortcut the path to your desired result!
the safest way to do so:
SEL selector=barButton.action;
id target=barButton.target;
if(selector && target){
IMP imp = [target methodForSelector:selector];
void (*func)(id, SEL) = (void *)imp;
func(target, selector);
}
Please read the original post here: performSelector may cause a leak because its selector is unknown