Contents

collectionView(_:numberOfItemsInSection:)

Asks your data source object for the number of items in the specified section.

Declaration

func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int

Parameters

  • collectionView:

    The collection view requesting this information.

  • section:

    An index number identifying a section in collectionView. This index value is 0-based.

Return Value

The number of items in section.

See Also

Getting item and section metrics