我正在使用 github 上的一个项目,它可以让我使用NSFetchedResultsController
and UICollectionView
,该项目就是这个
但是当我以这种方式保存一个新对象时:
NSManagedObject *doc = [NSEntityDescription insertNewObjectForEntityForName:@"Document" inManagedObjectContext:self.managedObjectContext];
[doc setValue:[title contents] forKey:@"docName"];
[doc setValue:element valueforKey:@"Element"]
[self saveContext];
我收到此错误:
CoreData: error: Serious application error. Exception was caught during Core Data change processing. This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification. Can't perform collection evaluate with non-collection object. with userInfo (null)
我试图删除该项目,并且保存工作,所以我认为该项目中的问题,有什么帮助吗?