setTarget:
ターゲットオブジェクトをセットします
-(void)setTarget:(id)anObject:
解説
ターゲットオブジェクトをセットします。
返り値
( void )
なし
引数
( id )anObject
フレームワーク
ApplicationKit
クラス
NSControl
Instance Methods
使用可能
10.1
参照
- action
- setAction:
- target
- setTarget:(NSCell)
例文
#import "OtherAction.h" @implementation OtherAction - (IBAction)myAction:(id)sender { [sender setTarget:switchClass]; NSLog([[sender target] className]);//senderはボタン } @end