xCode/iOS Search on multiple criteria
I have an iPhone project that has a word and its translation.
I can search using either one or the other, using something like:
tableModel.searchPropertyName = @"word"; or
tableModel.searchPropertyName = @"t开发者_运维知识库ranslation";
I'd like to be able to search based on either.
Is this possible, and if so, how?
Thanks..
If you're using NSPredicate, construct an "and" predicate or "or" predicate that contains both of your searches as subpredicates.
If you're not using NSPredicate, switch to using NSPredicate then follow the first sentence.
精彩评论