contextMenuInteraction(_:previewForHighlightingMenuWithConfiguration:)
Returns the source view to use when animating the appearance of the preview interface.
Declaration
optional func contextMenuInteraction(_ interaction: UIContextMenuInteraction, previewForHighlightingMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview?Parameters
- interaction:
The interaction object that triggered the preview.
- configuration:
The configuration object associated with the current interaction.
Return Value
An object containing the source view and configuration parameters for the animation.
Discussion
UIKit calls this method before an interaction begins, to give you an opportunity to supply a custom source view for the presentation animations. If you didn’t provide a preview handler block in the configuration data, UIKit displays the specified view in the preview interface.