respondsToSelector

SEL sel = @selector (start:) ; // 指定action  

if ([obj respondsToSelector:sel]) 

{ //判断该对象是否有相应的方法  

[obj performSelector:sel withObject:self]; //调用选择器方法  

}

原文地址:https://www.cnblogs.com/ejllen/p/3747594.html