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
true
to perform diffing in the background, passfalse
to perform diffing on the main thread.Declaration
Swift
public let diffOnBackgroundQueue: Bool
-
Specifies whether or not the
CollectionViewDriver
should perform a hardreloadData()
when replacing theCollectionViewModel
with a new one, or if it should always perform a diff.A replacement occurs when providing a new
CollectionViewModel
to theCollectionViewDriver
that has a differentid
than the previous model.Declaration
Swift
public let reloadDataOnReplacingViewModel: Bool
-
Initializes a
CollectionViewDriverOptions
object.Declaration
Swift
public init( diffOnBackgroundQueue: Bool = false, reloadDataOnReplacingViewModel: Bool = false )
Parameters
diffOnBackgroundQueue
Whether or not to perform diffing on a background queue. Default is
false
.reloadDataOnReplacingViewModel
Whether or not to reload or diff during replacement. Default is
false
.