//数据源
@property (nonatomic,strong)NSArray *nameArray;
//过滤后的数据源
@property (nonatomic,strong)NSMutableArray *result;
NSString *filterString =@"text";
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF contains [c] %@", filterString];
//过滤数据
self.result = [NSMutableArray arrayWithArray:[self.nameArray filteredArrayUsingPredicate:predicate]];