O'Reilly logo

Core Data iOS Essentials by B.M. Harwani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying the concept of multiple managed object context in our application

To apply the concept of multiple managed object context in our application, we will create a separate instance of managed object context with the name custcontext and associate it with the View of the AddNameController class. That is, the name of the customer added by the user in the View of AddNameController class will be stored in this separate context (custcontext) and not in the application's main context: managedObjectContext. When the Save button is selected (in the View of AddNameController class), a NSNotification with the NSManagedObjectContextDidSaveNotification key will be broadcasted that invokes a method, which consequently invokes the mergeChangesFromContextDidSaveNotification ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required