HorizontalSelectionViewDataSource
public protocol HorizontalSelectionViewDataSource : AnyObject
An object that adopts the HorizontalSelectionViewDataSource protocol is responsible for providing the data and views required by a horizontal view. A data source object represents your app’s data model and vends information to the horizontal view as needed. It also handles the creation and configuration of cells and supplementary views used by the horizontal view to display your data.
-
Asks your data source object for the number of items in the specified section.
Declaration
Swift
func numberOfItems(in horizontalSelectionView: HorizontalSelectionView) -> IntParameters
horizontalSelectionViewthe horizontal view.
Return Value
the number of items.
-
Asks your data source object for the cell that corresponds to the specified item in the horizontal view.
Declaration
Swift
func horizontalSelectionView(_ horizontalSelectionView: HorizontalSelectionView, cell: HorizontalSelectionViewCell, atPosition position: Int)Parameters
horizontalSelectionViewthe horizontal view.
cellthe cell to configure.
positionthe position that specifies the location of the item.
View on GitHub
Install in Dash
HorizontalSelectionViewDataSource Protocol Reference