Easier Tables: NSFetchedResultsController

So far, after converting the CarValet app to Core Data, you have used a modified version of the car array to manage the table view. Each time there is a change to the data, a new array is generated. This has worked so far because there is not much data. However, it does not work as the number of cars gets larger—for example, if you keep a history of all cars parked. When there are too many data objects, at best you will have performance problems. More likely, you will have memory issues.

It also seems as if there should be less code. After all, if the managed object context can produce the array, it must have information on how many cars there are as well as an order for them. At the moment, you have ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming 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.