Unleash Core Data by Avi Tsadok

Unleash Core Data by Avi Tsadok

Author:Avi Tsadok
Language: eng
Format: epub
ISBN: 9781484282113
Publisher: Apress


Besides the fetch request, there are additional parameters we can or need to provide when initializing the FRC .

First, we need to provide a managed object context the NSFetchedResultsController will work with.

Even though the NSFetchedResultsController is relevant to UI-related tasks only, you need to remember that we can work with multiple main contexts or even multiple stacks.

Just like the fetch request, the context parameter is mandatory.

The rest of the parameters are not mandatory, but they add additional capabilities.

With sectionNameKeyPath, we can help the FRC group the results into sections that answer many TableView needs.

The cacheName can help the FRC optimize its fetching mechanism, making it more efficient when handling a big amount of data.

Both sectionNameKeyPath and cacheName parameters will be discussed soon, I promise!

After setting the fetch request, we need to call performFetch() to start up the NSFetchedResultsController and load it with objects:try fetchController.performFetch()



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.