Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Your development SDK is the newest SDK, but you want to support devices running older iOS versions and APIs.
Use the instancesRespondToSelector: class method of
NSObject to determine whether a
specific selector exists in an instance of that class.
A selector is the name of your method without the parameter data types. For instance, given the following method declaration:
- (BOOL) doesString:(NSString *)paramNeedle
existInString:(NSString *)paramHaystack;
The selector for this method would be doesString:existInString:.
To determine whether a class itself
responds to a class method, use the respondsToSelector: class method of your class.
You can use the same method on an instance of a class to determine
whether that instance responds to an instance method, as well as the
instancesRespondToSelector: class
method of the NSObject
class.