June 2016
Intermediate to advanced
214 pages
5h 40m
English
In the previous section, you saw how to consume changes from one context into another. With iOS 5.0, Core Data added another option to handle change notifications. Instead of having every context talk directly to the NSPersistentStoreCoordinator, we can chain contexts together in a parent/child design.
Each child context will request objects from its parent context, and if that parent context doesn’t have the objects requested, it will pass that request up the chain until it hits the NSPersistentStoreCoordinator and I/O is performed. However, if the parent context does have a reference to the desired objects, then they’re returned to the child without I/O being performed.
Further, when a child makes ...
Read now
Unlock full access