Created
July 22, 2013 15:24
-
-
Save jerrymarino/6054720 to your computer and use it in GitHub Desktop.
Magical Record without parent contexts
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
//Also fine to use MR_coordinatorWithInMemoryStore | |
NSPersistentStoreCoordinator *coordinator = [NSPersistentStoreCoordinator MR_newPersistentStoreCoordinator]; | |
[NSPersistentStoreCoordinator MR_setDefaultStoreCoordinator:coordinator]; | |
NSManagedObjectContext *defaultContext = [NSManagedObjectContext MR_newMainQueueContext]; | |
defaultContext.persistentStoreCoordinator = coordinator; | |
[NSManagedObjectContext performSelector:@selector(MR_setDefaultContext:) withObject:defaultContext]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment