从NSArray中检索列表

时间:2013-10-21 12:58:30

标签: cocoa list nsarray nspredicate

我想在不运行for循环的情况下从数组内容中设置列表。 我使用appendEntities方法来实现这一目标。

NSMutableArray *mutArray = [[[self tempList] makeArray] mutableCopy];
[mutArray filterUsingPredicate :aPredicate];//Setting a user defined predicate format here.
NSArray *newListArray = [NSArray arrayWithArray:mutArray];

//After setting the predicate I want the array content to be present in the entityList.
ISTModelList  *entityList = [[ISTModelList alloc] init];
[entityList appendEntities:newListArray];
NSLog(@"entityList %@",entityList);

当我尝试打印列表时,在调试器控制台中出现以下错误。

 -[__NSCFDictionary setContextKey:]: unrecognized selector sent to instance 0x10aca9090

如何从阵列中获取列表以避免循环?

0 个答案:

没有答案