I was wondering if I could select objects based on a predicate with an array... for example
Code:
[NSPredicate predicateWithFormat:@"id=%@", arrayOfID];
Will it work? If no, how can I do it?
The correct predicate would be
[NSPredicate predicateWithFormat:@"id IN %@", arrayOfID];
Assuming that arrayOfId contains objects of the same type as id (e.g. NSNumbers or NSStrings).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With