macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

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