标签:turn person tco color class bsp com ati span
NSArray *arr = @[@(1), @(9), @(5), @(2)]; NSArray *newArr = [arr sortedArrayUsingSelector:@selector(compare:)];
NSArray *arr = @[p1, p2, p3, p4, p5]; // 默认按照升序排序 NSArray *newArr = [arr sortedArrayWithOptions:NSSortConcurrent usingComparator:^NSComparisonResult(Person *obj1, Person *obj2) { return obj1.age > obj2.age; }]; NSLog(@"%@", newArr);
标签:turn person tco color class bsp com ati span
原文地址:http://www.cnblogs.com/xufengyuan/p/6636841.html