博客> iOS,NSPredicate筛选NsmutableArray,
iOS,NSPredicate筛选NsmutableArray,
2017-08-17 00:31 评论:0 阅读:238 yutaotst
ios NSMutableArray 筛选 NSPredicate筛选

iOS,NSPredicate筛选NsmutableArray,

 NSString *filterString = searchController.searchBar.text;

    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"self.name  contains [c] %@", filterString];

    self.searchArray = [NSMutableArray arrayWithArray:[self.dataArray filteredArrayUsingPredicate:predicate]];
收藏
1
sina weixin mail 回到顶部