Instance Method

controller(_:didChangeContentWith:)

Notifies the receiver about changes to the content in the fetched results controller, by using a diffable data source snapshot.

Declaration

optional func controller(_ controller: NSFetchedResultsController<NSFetchRequestResult>, didChangeContentWith snapshot: NSDiffableDataSourceSnapshot)

Discussion

To apply the changes, call applySnapshot(_:animatingDifferences:) on the collection or table view’s data source.

If this method is implemented, no other delegate methods are invoked.

See Also

Responding to Changes

func controller(NSFetchedResultsController<NSFetchRequestResult>, didChangeContentWith: CollectionDifference<NSManagedObjectID>)

Notifies the receiver about changes to the content in the fetched results controller, by using a collection difference.

func controllerWillChangeContent(NSFetchedResultsController<NSFetchRequestResult>)

Notifies the receiver that the fetched results controller is about to start processing of one or more changes due to an add, remove, move, or update.

func controllerDidChangeContent(NSFetchedResultsController<NSFetchRequestResult>)

Notifies the receiver that the fetched results controller has completed processing of one or more changes due to an add, remove, move, or update.