博客> iOS,NSPredicate筛选NsmutableArray,
iOS,NSPredicate筛选NsmutableArray,
2018-02-18 09:17 评论:0 阅读:477 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 回到顶部