func method(for: Selector!) -> IMP!
Locates and returns the address of the receiver’s implementation of a method so it can be called as a function.
あるメソッドのこのレシーバの持つ実装の所在(アドレス)を突き止めて返します、それでそれは関数として呼び出し可能です。
Availability
Technology
class func instanceMethod(for aSelector: Selector
!) -> IMP!
aSelector
A Selector that identifies the method for which to return the implementation address. The selector must be non-NULL
and valid for the receiver. If in doubt, use the responds(to:)
method to check before passing the selector to method(for:)
.
The address of the implementation of the a
instance method.
An error is generated if instances of the receiver can’t respond to a
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.
func method(for: Selector!) -> IMP!