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