setContent:
レシーバーの内容をcontentにします
-(void)setContent:(id)content:
解説
レシーバーの内容をcontentにします。
contentはオブジェクトの配列やシングルルートオブジェクトに出来る
返り値
( void )
なし
引数
( id )content
フレームワーク
ApplicationKit
クラス
NSTreeController
Instance Methods
使用可能
10.4
参照
-content
例文
#import "MyObject.h" // IBOutlet NSTreeController* myTreeController; @implementation MyObject -(void)awakeFromNib { //挿入するオブジェクトを作る NSDictionary *dic1 = [NSDictionary dictionaryWithObject:@"aaaa" forKey:@"newKey"]; NSDictionary *dic2 = [NSDictionary dictionaryWithObject:@"bbbb" forKey:@"newKey"]; NSDictionary *dic3 = [NSDictionary dictionaryWithObject:@"cccc" forKey:@"newKey"]; NSArray *objects = [NSArray arrayWithObjects:dic1,dic2,dic3,nil]; //内容をセットする [myTreeController setContent:objects ]; } - (IBAction)myAction:(id)sender { } @end