Search code examples
ioscore-datauisplitviewcontrollernsmanagedobjectcontext

ManagedObjectContext shared between detail and master?


If I have a UISplitViewController and set an instance of a ManagedObjectContext in both the Master and Detail controllers to the same ManagedObjectContext do they stay synchronised or do I have to conduct merges, the same as I would if I was performing multithread updates?


Solution

  • If they both have the same context, you will not have to merge changes. Of course, you do have to take care in making changes at different threads, but that's easy enough with performBlock: and performBlockAndWait:.