Asks the delegate if the item should be highlighted during tracking.
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The collection view object that is asking about the highlight change.
The index path of the cell to be highlighted.
true if the item should be highlighted or
false if it should not.
As touch events arrive, the collection view highlights items in anticipation of the user selecting them. As it processes those touch events, the collection view calls this method to ask your delegate if a given cell should be highlighted. It calls this method only in response to user interactions and does not call it if you programmatically set the highlighting on a cell.
If you return
false in your implementation, the cell does not get highlighted and the system bypasses the entire selection process. That is, the system does not call
collection or any other selection-related methods. If you return
is is set to
collection is called, and the system begins the selection process.
If you do not implement this method, the default return value is