是否可以从fetchedResultsController中取出一个对象fetchedObjects?从fetchedResultsController中移除一个对象fetchedObjects
例如,我有以下代码:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"pack.packName IN %@", allowedPackNames];
for (int i = 0; i < [tempFetchResults.fetchedObjects count]; i++){
Author *author = [tempFetchResults.fetchedObjects objectAtIndex:i];
NSSet *filteredQuotes = [author.quotes filteredSetUsingPredicate:predicate];
if ([filteredQuotes count] > 0){
author.quotes = filteredQuotes;
} else {
//remove this author from the fetchedObjects array
}
}
我怎样才能做到这一点?
是否有意删除对象或只是从结果中删除它? – svena 2013-04-05 08:16:54
@Svena我只是想从结果中删除它 – xonegirlz 2013-04-05 08:22:21