I have a NSPredicate that looks like this:
NSPredicate *likePredicate3= [NSPredicate predicateWithFormat:@"synonyms LIKE[cd] %@",[NSString stringWithFormat:@"%@", searchText]];
I apply it to an NSArray of objects of a class that has the 'synonyms' property.
It works fine when the searchText is a whole word such as "Thanks". However if I try to use strings with space in them such as 'Thank you', it fails and the predicate search does not find the match in the array.
Is there a way to ask NSPredicate to work with words that have a blank space(s) in them?
thanks.
searchText
rather than just usingsearchText
itself? – dreamlax