targetForAction:to:from:
アクションメッセージを受けるオブジェクトを返します
-(id)targetForAction:(SEL)theAction: to:(id)theTarget: from:(id)sender:
解説
アクションメッセージ(theAction)を受けるオブジェクトを返します。
返り値
( id )
オブジェクト
引数
( SEL )theAction
アクション
( id )theTarget
ターゲット
( id )sender
送信オブジェクト
フレームワーク
ApplicationKit
クラス
NSApplication
Instance Methods
使用可能
10.0
参照
- sendAction:to:from:
- tryToPerform:with:
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { NSLog ([[NSApp targetForAction:@selector(hide:) to:self from:sender ] className]); } @end