CollectionViewDriverOptions
public struct CollectionViewDriverOptions : Hashable
Defines various options to customize behavior of a CollectionViewDriver.
-
Specifies whether or not to perform diffing on a background queue. Pass
trueto perform diffing in the background, passfalseto perform diffing on the main thread.Declaration
Swift
public let diffOnBackgroundQueue: Bool -
Specifies whether or not the
CollectionViewDrivershould perform a hardreloadData()when replacing theCollectionViewModelwith a new one, or if it should always perform a diff.A replacement occurs when providing a new
CollectionViewModelto theCollectionViewDriverthat has a differentidthan the previous model.Declaration
Swift
public let reloadDataOnReplacingViewModel: Bool -
Initializes a
CollectionViewDriverOptionsobject.Declaration
Swift
public init( diffOnBackgroundQueue: Bool = false, reloadDataOnReplacingViewModel: Bool = false )Parameters
diffOnBackgroundQueueWhether or not to perform diffing on a background queue. Default is
false.reloadDataOnReplacingViewModelWhether or not to reload or diff during replacement. Default is
false.
View on GitHub