Learn Swift and iOS Development
Master iOS development through in-depth tutorials and comprehensive courses on Swift, SwiftUI, UIKit, Core Data, and more.
Master iOS development through in-depth tutorials and comprehensive courses on Swift, SwiftUI, UIKit, Core Data, and more.
Even though you don't need to use the NSFetchedResultsController class to populate a table view, I find myself using it quite a bit in Core Data applications. Swift 3 has substantially improved support for Core Data and the NSFetchedResultsController class also benefits from these optimizations.
in Core Data
In yesterday's tutorial, we populated a table view with quotes using the NSFetchedResultsController class. But the table view is currently empty since we haven't added the ability to add quotes yet.
in Core Data
In this tutorial, we add the ability to update quotes. Not only do we want the table view to reflect the changes we make to a quote, we also want to make sure the sort order of the quotes is updated when a quote is modified. You guessed it. The NSFetchedResultsController class and the NSFetchedResultsControllerDelegate protocol make this almost trivial.
in Core Data
In this tutorial, we add sections to the table view of quotes. Each section contains the quotes of a particular author. If you want to follow along, download the source files of this tutorial at the bottom of the tutorial.
in Core Data