Reputation: 411
I have the following expression
NSPredicate* predicate = [NSPredicate predicateWithFormat:@"value1== %@", variable1];
I want to expand the above expression to compare two values e.g."if((value1==variable1)&&(value2==variable2))
How is this possible?
Upvotes: 1
Views: 340
Reputation: 86651
NSPredicate* predicate = [NSPredicate predicateWithFormat:@"value1== %@ && value2 == %@", variable1, varible2];
Check out the predicate programming guide.
Upvotes: 2