collectionView(_:willPerformPreviewActionForMenuWith:animator:)
Informs the delegate when a user triggers a commit by tapping the preview.
Declaration
optional func collectionView(_ collectionView: UICollectionView, willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration, animator: any UIContextMenuInteractionCommitAnimating)Parameters
- collectionView:
The collection view that informs the delegate of this event.
- configuration:
The configuration of the menu being displayed.
- animator:
The animations to run alongside the commit transition.
See Also
Managing context menus
Adding context menus in your appcollectionView(_:willDisplayContextMenu:animator:)collectionView(_:willEndContextMenuInteraction:animator:)collectionView(_:contextMenuConfigurationForItemsAt:point:)collectionView(_:contextMenuConfiguration:highlightPreviewForItemAt:)collectionView(_:contextMenuConfiguration:dismissalPreviewForItemAt:)