I am trying to find several fields. Something like that:
[NSPredicate predicateWithFormat:@"(name title contains[cd] %@) AND (title contains[cd] %@", self.searchBar.text];
The search is performed both in the name field and in the title field.
Also, if anyone knows what the search for wildcards will look like, I would appreciate it too.
I tried:
[NSPredicate predicateWithFormat:@"* contains[cd] %@", self.searchBar.text];
my error code is:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse the format string "(name contains[cd] %@) OR (title contains[cd] %@"'
source
share