November 2013
Intermediate to advanced
576 pages
19h 3m
English
When the “master” view controller is set up using Xcode’s Master Detail template, Xcode creates a property for the fetched results controller, and overrides the accessor method (fetchedResultsController) to lazy load or initialize the fetched results controller the first time it is requested. First the method checks to see whether the fetched results controller has already been initialized:
if (__fetchedResultsController != nil){ return __fetchedResultsController;}
If the fetched results controller is already set up, it is returned. Otherwise, a new fetched results controller is set up, starting with a fetch request:
NSFetchRequest *fetchRequest ...
Read now
Unlock full access