representedObject
セルにセットしたオブジェクトを返します
解説
セルにセットしたオブジェクトを返します。
プログラマが、一時的にデータを保管するために使うことができます。
返り値
( id )
オブジェクト
引数
フレームワーク
ApplicationKit
クラス
NSCell
Instance Methods
使用可能
10.0
参照
- setRepresentedObject:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { [bCell1 setRepresentedObject:@"1st text"]; [bCell2 setRepresentedObject:@"2nd text"]; } - (IBAction)cellPush:(id)sender { //[sender setTitle:[sender representedObject]]; [bCell1 setTitle:[bCell1 representedObject]]; [bCell2 setTitle:[bCell2 representedObject]]; } @end