Introducing the Fetched Results Controller

A fetched results controller (NSFetchedResultsController) is a very effective liaison between Core Data and a UITableView. The fetched results controller provides a way to set up a fetch request so that the results are returned in sections and rows, accessible by index paths. In addition, the fetched results controller can listen to changes in Core Data and update the table accordingly using delegate methods.

In the sample app, refer to ICFMovieListViewController for a detailed example of a fetched results controller in action (see Figure 13.9).

Image

Figure 13.9 Sample App: Movie list view controller.

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.