Type Method 型メソッド

instanceMethodForSelector:

Locates and returns the address of the implementation of the instance method identified by a given selector. 指定されたセレクタによって識別されるインスタンスメソッドの実装の所在(アドレス)を突き止めて返します。

Declaration 宣言

+ (IMP)instanceMethodForSelector:(SEL)aSelector;

Parameters パラメータ

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 respondsToSelector: method to check before passing the selector to methodForSelector:.

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 methodForSelector: instance method to the class instead.

See Also 参照

Obtaining Information About Methods メソッドについての情報の取得