instanceMethod(for:)
Locates and returns the address of the implementation of the instance method identified by a given selector.
Declaration
class func instanceMethod(for aSelector: Selector!) -> IMP!Parameters
- aSelector:
A TP40008195 CH48 that identifies the method for which to return the implementation address. The selector must be non-
NULLand valid for the receiver. If in doubt, use the Responds(to:) method to check before passing the selector to Method(for:).
Return Value
The address of the implementation of the aSelector instance method.
Discussion
An error is generated if instances of the receiver can’t respond to aSelector messages.
Use this method to ask the class object for the implementation of instance methods only. To ask the class for the implementation of a class method, send the method(for:) instance method to the class instead.