CollectionViewDataSource
public final class CollectionViewDataSource<Object> : NSObject, UICollectionViewDataSource
CollectionViewDataSource
uses data provider and provides the data as a UICollectionViewDataSource
.
See also
UICollectionViewDataSource
-
The data provider which provides the data to the data source.
Declaration
Swift
public let dataProvider: AnyDataProvider<Object>
-
Data modificator can be used to modify the data providers content.
Declaration
Swift
public let dataModificator: DataModifying?
-
Provides section index tiltes.
Declaration
Swift
public let sectionIndexTitles: SectionIndexTitles?
-
init(dataProvider:
cellConfiguration: supplementaryViewConfiguration: dataModificator: sectionIndexTitles: ) Creates an instance with a data provider and a cell configuration which will be displayed in the collection view.
See also
DataProvider
See also
Declaration
Swift
public init<Cell: ReusableViewConfiguring, DataProviderType: DataProvider, SupplementaryConfig: ReusableViewConfiguring> (dataProvider: DataProviderType, cellConfiguration: Cell, supplementaryViewConfiguration: SupplementaryConfig, dataModificator: DataModifying? = nil, sectionIndexTitles: SectionIndexTitles? = nil) where DataProviderType.Element == Object, Cell.Object == Object, SupplementaryConfig.Object == Object, Cell.View: UICollectionViewCell
Parameters
dataProvider
the data provider which provides data to the data source
cellConfiguration
the cell configuration for the collection view cell for displaying the contents of the data provider.
supplementaryViewConfigurations
the reusable view configurations for the collection view supplementary views.
dataModificator
data modifier to modify the data. Defaults to
nil
.sectionIndexTitles
provides section index titles. Defaults to
nil
. -
Creates an instance with a data provider and a cell configuration which will be displayed in the collection view.
See also
DataProvider
See also
Declaration
Swift
public init<Cell: ReusableViewConfiguring, DataProviderType: DataProvider>(dataProvider: DataProviderType, cellConfiguration: Cell, dataModificator: DataModifying? = nil, sectionIndexTitles: SectionIndexTitles? = nil) where DataProviderType.Element == Object, Cell.Object == Object, Cell.View: UICollectionViewCell
Parameters
dataProvider
the data provider which provides data to the data source
cellConfiguration
the cell configuration for the collection view cell for displaying the contents of the data provider.
supplementaryViewConfigurations
the reusable view configurations for the collection view supplementary views.
dataModificator
data modifier to modify the data. Defaults to
nil
.sectionIndexTitles
provides section index titles. Defaults to
nil
.