O'Reilly logo

Core Data in Swift by Marcus S. Zarra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Under the Hood of the NSFetchedResultsController

We can see the value of an NSFetchedResultsController, but how does it actually work? When I started to explore the details, I was shocked to find out that I could duplicate much of the behavior of the NSFetchedResultsController using publicly available APIs.

This means that, instead of trying to cram the NSFetchedResultsController into places that it almost fits (or worse), you can build your own that behaves exactly in the way that you need to. By using publicly exposed APIs, the Core Data team has invited us to build our own observers of Core Data so that non–table view user interfaces can react to changes in the data easily.

At its core, the NSFetchedResultsController takes advantage of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required