I have an array of objects.
Object body is a sentence, and i want to filter my UITableView
by the word of this sentence.
For example, I have to objects:
Id: 1; Body: "Hello my dear friend";
Id: 2; Body: "Frodo, give me the ring!";
And if i begin to enter "Fr" UISearchControler
must return both of objects, because both contains the words begins with "Fr" ("frodo, friend"). Then if I enter "Fro" it will return second object.
Now I'm splitting the messages into array of words, and filterring them with
@"self.body contains[c]%@", searchString
predicate.
How can i combine contains and beginwith predicates?