博客> iOS,NSPredicate筛选NsmutableArray,
iOS,NSPredicate筛选NsmutableArray,
2017-10-18 05:57 评论:0 阅读:295 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 回到顶部