Last active
August 29, 2015 14:15
-
-
Save Br1an-Boyle/448e8d133d1c2718bdb1 to your computer and use it in GitHub Desktop.
Main Context Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSManagedObjectContext *)mainManagedObjectContext { | |
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; | |
if (coordinator != nil) { | |
_mainManagedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; | |
[_mainManagedObjectContext setPersistentStoreCoordinator:coordinator]; | |
} | |
return _mainManagedObjectContext; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment