The object that provides the data for the collection view.
The data source must adopt the
UICollectionViewDataSource protocol. The collection view maintains a weak reference to the data source object.
Providing the Collection View Data
An object that adopts the
UICollectionViewDataSource protocol is responsible for providing the data and views required by a collection view. A data source object represents your app’s data model and vends information to the collection view as needed. It also handles the creation and configuration of cells and supplementary views used by the collection view to display your data.