collectionView(_:didChangeItemsAt:to:)
Notifies the delegate that the highlight state of the specified items changed.
Declaration
@MainActor optional func collectionView(_ collectionView: NSCollectionView, didChangeItemsAt indexPaths: Set<IndexPath>, to highlightState: NSCollectionViewItem.HighlightState)Parameters
- collectionView:
The collection view notifying you of the highlight change.
- indexPaths:
The set of Nsindexpath objects corresponding to the items whose highlight state changed.
- highlightState:
The new highlight state of the items.
Discussion
After the highlight state of one or more items changes successfully, the collection view calls this method to report the change. Use this method to respond to the change and to make any necessary adjustments to your content or the collection view.