NSPredicate 根据谓语动词 进行 模糊查询

/**

     *  模糊查询

     */

    NSString *filterString = textField.text;

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

    self.visableArray = [NSMutableArray arrayWithArray:[self.dataSourceArray filteredArrayUsingPredicate:predicate]];

    [_visableTableView reloadData];

posted @ 2016-02-03 10:43  偶阵雨ss33  Views(226)  Comments(0Edit  收藏  举报