开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜