标签:
1.排序
[self.tableItems sortUsingComparator:^NSComparisonResult(GPBTeacherBrief* obj1, GPBTeacherBrief* obj2) { if (obj1.distanceFromMe < obj2.distanceFromMe) { return NSOrderedAscending; }else if(obj1.distanceFromMe == obj2.distanceFromMe){ return NSOrderedSame; }else{ return NSOrderedDescending; } }];
2.筛选
NSPredicate* predicate = [NSPredicate predicateWithFormat:@"(startingPrice > 200) AND (startingPrice <= 500)"]; [self.tableItems filterUsingPredicate:predicate];
标签:
原文地址:http://www.cnblogs.com/guoxiaoqian/p/4659061.html