有异曲同工之妙
- (BOOL)instancesRespondToSelector:(SEL)aSelector
- (BOOL)respondsToSelector:(SEL)aSelector
大牛们都写的很好了拿来用用吧
If aSelector
messages are forwarded to other objects, instances of the class are able to receive those messages without error even though this method returns NO
- (BOOL)conformsToProtocol:(Protocol *)protocol
- (BOOL)conformsToProtocol:(Protocol *)protocol