A NSPredicate category to help with a dinamic Search
NSPredicateSearch
A NSPredicate category to help with a dinamic Search (smart search).
Running
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
let predicate = NSPredicate(search: query, searchTerm: "name")
self.array.filter(using: predicate!)
self.array = NSMutableArray(array:self.arrayAll.filtered(using: predicate!))
NSPredicate *predicate = [NSPredicate predicateWithSearch:searchText searchTerm:@"searchTerms"];
self.arrayData = [[NSMutableArray alloc] initWithArray:[self.arrayAllData filteredArrayUsingPredicate:predicate]];
Requirements
iOS 8 +
Installation
NSPredicateSearch is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "NSPredicateSearch"
Author
Narlei A Moreira