respondsToSelector

- (BOOL)respondsToSelector:(SEL)aSelector

    Returns a Boolean value that indicates whether the receiver implements or inherits a method that can respond to a specified message. (required)

Paraments:aSelector: A selector that identifies a message.

Return:YES if the receiver implements or inherits a method that can respond to aSelector, otherwise NO.

判断是否实现了方法。

http://www.cnblogs.com/chenjunbiao/archive/2011/04/21/2023196.html

原文地址:https://www.cnblogs.com/mybkn/p/2408841.html