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
DataProviderSee 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: UICollectionViewCellParameters
dataProviderthe data provider which provides data to the data source
cellConfigurationthe cell configuration for the collection view cell for displaying the contents of the data provider.
supplementaryViewConfigurationsthe reusable view configurations for the collection view supplementary views.
dataModificatordata modifier to modify the data. Defaults to
nil.sectionIndexTitlesprovides 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
DataProviderSee 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: UICollectionViewCellParameters
dataProviderthe data provider which provides data to the data source
cellConfigurationthe cell configuration for the collection view cell for displaying the contents of the data provider.
supplementaryViewConfigurationsthe reusable view configurations for the collection view supplementary views.
dataModificatordata modifier to modify the data. Defaults to
nil.sectionIndexTitlesprovides section index titles. Defaults to
nil.
View on GitHub
CollectionViewDataSource Class Reference