0
我有以下數組包含其他數組。如何對此NSArray的元素進行排序?
NSArray *results = [[NSArray alloc] initWithObjects:
[NSArray arrayWithObjects:@"Nickname1", [NSNumber numberWithBool:YES], nil],
[NSArray arrayWithObjects:@"Nickname2", [NSNumber numberWithBool:NO], nil],
[NSArray arrayWithObjects:@"Nickname3", [NSNumber numberWithBool:YES], nil],
[NSArray arrayWithObjects:@"Nickname4", [NSNumber numberWithBool:YES], nil],
nil ];
如何通過第二個參數(布爾值)對此數組的元素進行排序。我可以使用NSSortDescriptor嗎? (我希望以前都是)。
感謝