applySnapshotUsingReloadData(_:completion:)
Resets the UI to reflect the state of the data in the snapshot without computing a diff or animating the changes, optionally executing a completion handler.
Declaration
@MainActor @preconcurrency func applySnapshotUsingReloadData(_ snapshot: NSDiffableDataSourceSnapshot<SectionIdentifierType, ItemIdentifierType>, completion: (() -> Void)? = nil)Parameters
- snapshot:
The snapshot that reflects the new state of the data in the table view.
- completion:
A closure to execute when the reload completes. This closure has no return value and takes no parameters. The system calls this closure from the main queue.
Discussion
The system interrupts any ongoing item animations and immediately reloads the table view’s content.
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.