开发者

NSPredicate compare syntax objective c

I have the following expression

NSPredicate* predicate = [NSPredicate predicateWithFormat:@"v开发者_C百科alue1== %@", variable1];

I want to expand the above expression to compare two values e.g."if((value1==variable1)&&(value2==variable2))

How is this possible?


NSPredicate* predicate = [NSPredicate predicateWithFormat:@"value1== %@ && value2 == %@", variable1, varible2];

Check out the predicate programming guide.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜