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

Building Our Own: MSZContextWatcher

Since the introduction of the NSFetchedResultsController, I’ve run into numerous situations in which I wanted to use its ability to detect data changes even when I wasn’t using a UITableView. Building a user interface for an iPad where three different entities are being displayed at once is a situation that begs for some kind of watcher to notify the user interface when the data has changed. Needing to watch not just a single type of entity but also relationships associated with that entity is another place where an observer is useful. Frequently I’d attempt to use an NSFetchedResultsController and run into one problem or another that made it more difficult than it needed to be. This led me to investigate ...

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