Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void) contextDidSaveFromSeparateThread:(NSNotification*)notification {
- [[self managedObjectContext] mergeChangesFromContextDidSaveNotification:notification];
- [self saveContext];
- }
- - (void) saveContext {
- NSError *error = nil;
- NSManagedObjectContext *context = [self managedObjectContext];
- [context save:&error];
- if (error != nil) {
- NSAssert1(0, @"Error saving current context -> %@", error);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement