- (NSManagedObjectContext*)getNewPrivateManagedObjectContext{
NSManagedObjectContext *privateContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
[privateContext performBlockAndWait:^{
[privateContext setParentContext:self.managedObjectContext];
[privateContext setMergePolicy:NSMergeByPropertyObjectTrumpMergePolicy];
}];
return privateContext ;
}
Link
No comments:
Post a Comment