controller(_:didChange:atSectionIndex:for:)
Notifies the receiver of the addition or removal of a section.
Declaration
optional func controller(_ controller: NSFetchedResultsController<any NSFetchRequestResult>, didChange sectionInfo: any NSFetchedResultsSectionInfo, atSectionIndex sectionIndex: Int, for type: NSFetchedResultsChangeType)Parameters
Discussion
The fetched results controller reports changes to its section before changes to the fetched result objects.
Special Considerations
This method may be invoked many times during an update event (for example, if you are importing data on a background thread and adding them to the context in a batch). You should consider carefully whether you want to update the table view on receipt of each message.