Contents

collectionView(_:didHighlightItemAt:)

Tells the delegate that the item at the specified index path was highlighted.

Declaration

optional func collectionView(_ collectionView: UICollectionView, didHighlightItemAt indexPath: IndexPath)

Parameters

  • collectionView:

    The collection view object that is notifying you of the highlight change.

  • indexPath:

    The index path of the cell that was highlighted.

Discussion

The collection view calls this method only in response to user interactions and does not call it if you programmatically set the highlighting on a cell.

See Also

Managing cell highlighting