setSortDescriptors:
ソートデスクリプタをセットします
-(void)setSortDescriptors:(NSArray *)sortDescriptors:
解説
ソートデスクリプタをセットします。
返り値
( void )
なし
引数
( NSArray * )sortDescriptors
ソートデスクリプタの配列
フレームワーク
ApplicationKit
クラス
NSArrayController
Instance Methods
使用可能
10.3
参照
-sortDescriptors
例文
//ソートデスクリプタ NSMutableArray *descriptors=[NSMutableArray arrayWithCapacity:0]; NSSortDescriptor *descriptor; descriptor=[[NSSortDescriptor alloc] initWithKey:@"sort1" ascending:YES selector:@selector(compare:)]; [[tableView tableColumnWithIdentifier:@"newKey"] setSortDescriptorPrototype:descriptor]; [descriptors addObject:descriptor]; [descriptor release]; descriptor=[[NSSortDescriptor alloc] initWithKey:@"sort2" ascending:YES selector:@selector(compare:)]; [[tableView tableColumnWithIdentifier:@"newKey2"] setSortDescriptorPrototype:descriptor]; [descriptors addObject:descriptor]; [descriptor release]; [myOutlet setSortDescriptors:descriptors];