numberOfSections(in:)
Asks your data source object to provide the total number of sections.
Declaration
@MainActor optional func numberOfSections(in collectionView: NSCollectionView) -> IntParameters
- collectionView:
The collection view requesting the information.
Return Value
The number of sections in the specified collection view.
Discussion
Implement this method when the organization of your data requires more than one section. If you do not implement this method, the collection view creates only one section.