Instance Method

numberOfItems(inSection:)

Returns the number of items in the specified section.

Declaration

func numberOfItems(inSection section: Int) -> Int

Parameters

section

The index of the section for which you want a count of the items.

Return Value

The number of items in the specified section.

See Also

Getting the State of the Collection View

var numberOfSections: Int

Returns the number of sections displayed by the collection view.

var visibleCells: [UICollectionViewCell]

Returns an array of visible cells currently displayed by the collection view.