applySnapshot(_:animatingDifferences:)
Updates the UI to reflect the state of the data in the snapshot, optionally animating the UI changes.
Declaration
func applySnapshot(_ snapshot: NSDiffableDataSourceSnapshotReference, animatingDifferences: Bool)Parameters
Discussion
The diffable data source computes the difference between the table view’s current state and the new state in the applied snapshot, which is an O(n) operation, where n is the number of items in the snapshot.
You can safely call this method from a background queue, but you must do so consistently in your app. Always call this method exclusively from the main queue or from a background queue.