setTarget:
セルのターゲットをセットします
-(void)setTarget:(id)anObject:
解説
セルのターゲットをセットします。
NSActionCellで実装されます。
返り値
( void )
なし
引数
( id )anObject
ターゲットオブジェクト
フレームワーク
ApplicationKit
クラス
NSCell
Instance Methods
使用可能
10.0
参照
- target
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { //bCell1はボタンセル [bCell1 setAction:@selector(otherAction)]; [bCell1 setTarget:self]; NSLog(NSStringFromSelector([bCell1 action])); } -(void)otherAction { NSLog(@"!!!"); } @end