Skip to content

Instantly share code, notes, and snippets.

@wuqian
Created October 23, 2012 07:48
Show Gist options
  • Save wuqian/3937510 to your computer and use it in GitHub Desktop.
Save wuqian/3937510 to your computer and use it in GitHub Desktop.
object-c selector
//定义
SEL class_func;
//赋值
@interface foo
-(int)add:int val;
@end
class_func = @selector(add:int);
//执行
SEL变量的执行.用performSelecor方法来执行.
[对象 performSelector:SEL变量 withObject:参数1 withObject:参数2];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment