Tells the delegate that the item at the specified index path was selected.
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The collection view object that is notifying you of the selection change.
The index path of the cell that was selected.
The collection view calls this method when the user successfully selects an item in the collection view. It does not call this method when you programmatically set the selection.