I am trying to fetch an entity from coredata using NSPredicate. I am trying to do a 'search as you type' approach. It works fine on a simple product name like "chair" or "Table".
But as soon as I tried the more complicate stuff like "Wheelchair - electric - power" then when I type in "Wheelchair electric" the result is not showing. I think it has to do with my NSPredicate predicateWithFormat but I've been at this for awhile now. So I need some help.
Here is my code (these are my best guesses)
request.predicate = [NSPredicate predicateWithFormat:@" Name BEGINSWITH [c] %@ ",searchText];
request.predicate = [NSPredicate predicateWithFormat:@" Name BEGINSWITH [c] %@ OR Name like[cd] %@ ",searchText,searchText];
Thanks in advance :) Pondd