I searched this answer all over the internet, but so far no luck. Therefore, I need to consult smart and nice people here. This is my first question asking the question here, so I hope I do it right and not repeat the question.
For all the examples I've seen, this is the search bar, which is a substring of what is stored in Core Data. On the other hand, I want to achieve the following:
The rows stored in the master data are actually substrings. I want to do a search by getting all the main data strings that have substrings belonging to the provided search string.
For example: In the master data, I have "AB", "BC", "ABC", "ABCDEF", "GH", "ABA", And in the application I search by providing the superstring: "ABCDEF", the result will return " AB "," BC "," ABC "," ABCDEF ", but not" GH "," ABA ", because these two substrings are not superstrings.
How do I configure the predicateWithFormat statement?
This does not work because it does the opposite:
NSPredicate *myPredicate = [NSPredicate predicateWithFormat:@"substring LIKE[c] %@", @"ABCDEF"];
Thanks everyone!