Contents

indexPath(for:)

Gets the index path of the specified cell.

Declaration

func indexPath(for cell: UICollectionViewCell) -> IndexPath?

Parameters

  • cell:

    The cell object whose index path you want.

Return Value

The index path of the cell or nil if the specified cell is not in the collection view.

See Also

Locating items and views in the collection view