Let's say i want to let user search for my objects using a name property of the objects.
I have no problem if the user only enters one word: e.g: facial
My predicate will be:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name CONTAINS[cd] %@", word];
But what if user enter more than one word separated by space? I want to do sth like:
NSArray *words = [query componentsSeparatedByString:@" "];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name CONTAINS[cd] ANY %@", words];
But it doesnt work. Any guidance? Thanks!