Master data selects objects from an array - iPhone

I was wondering if I can select objects based on a predicate with an array ... for example

code: [Challenger NSPredicateWithFormat: @ "id =% @", arrayOfID];

Will this work? If not, how can I do this?

The best

+3
source share
2 answers

The correct predicate will be

[NSPredicate predicateWithFormat:@"id IN %@", arrayOfID];

Assuming arrayOfId contains objects of the same type as id (e.g. NSNumbers or NSStrings).

+5
source

Yes of course you can do it.

It looks like you need a little grounding in Core Data. I found the following tutorial really useful for getting me off the ground with Core Data:

http://iphoneinaction.manning.com/iphone_in_action/2009/08/core-data-part-1-an-introduction.html

0

Source: https://habr.com/ru/post/1736455/


All Articles