Hi,
Just wondering what the best way to build a NSPredicate is if some filters are optional?
This is basically for a filter, so if some options aren't selected I don't to filter by them
eg. If I have option1 and option2 set for the filter.
NSPredicate* predicate = [NSPredicate predicateWithFormat:@"option1 = %@ AND option2 = %@] ....
otherwise if just option1 NSPredicate* predicate = [NSPredicate predicateWithFormat:@"option1 = %@] ....
The key being there are 10 different options to filter, so I don't want to have to code for the 10x10 possible combinations.
Thanks