bigfish24 / ABFRealmSearchViewController

Drop-in text search interface for Realm data
MIT License
87 stars 19 forks source link

Search from multiple key path / properties at once? #3

Open Tj3n opened 8 years ago

Tj3n commented 8 years ago

I'm trying to figure out how your Swift Demo works, i can get it to search in tittle, emoji, content...but i cant make it search for all 3 at once... what string i have to put to make that work? thankyou

bigfish24 commented 8 years ago

Right now the library only searches against 1 key path. A simple way to add this without changing the library is to subclass ABFRealmSearchViewController and override this method in the subclass:

- (NSPredicate *)searchPredicateWithText:(NSString *)text

The controller passes in the text from the search bar and you then need to return the NSPredicate that searches against the multiple key paths.