Link Search Menu Expand Document

ContextMenuInteractionDelegate

The methods for providing the set of actions to perform on your content, and for customizing the preview of that content.

public protocol ContextMenuInteractionDelegate: AnyObject 

Inheritance

AnyObject

Default Implementations

contextMenuInteraction(_:previewForHighlightingMenuWithConfiguration:)

public func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                                     previewForHighlightingMenuWithConfiguration configuration: ContextMenuConfiguration)
      -> TargetedPreview? 

contextMenuInteraction(_:previewForDismissingMenuWithConfiguration:)

public func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                                     previewForDismissingMenuWithConfiguration configuration: ContextMenuConfiguration)
      -> TargetedPreview? 

contextMenuInteraction(_:willPerformPreviewActionForMenuWith:animator:)

public func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                                     willPerformPreviewActionForMenuWith configuration: ContextMenuConfiguration,
                                     animator: ContextMenuInteractionCommitAnimating) 

contextMenuInteraction(_:willDisplayMenuFor:animator:)

public func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                                     willDisplayMenuFor configuration: ContextMenuConfiguration,
                                     animator: ContextMenuInteractionAnimating?) 

contextMenuInteraction(_:willEndFor:animator:)

public func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                                     willEndFor configuration: ContextMenuConfiguration,
                                     animator: ContextMenuInteractionAnimating?) 

Requirements

contextMenuInteraction(_:​configurationForMenuAtLocation:​)

Returns the configuration data to use when previewing the content.

func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                              configurationForMenuAtLocation location: Point)
      -> ContextMenuConfiguration?

contextMenuInteraction(_:​previewForHighlightingMenuWithConfiguration:​)

Returns the source view to use when animating the appearance of the preview interface.

func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                              previewForHighlightingMenuWithConfiguration configuration: ContextMenuConfiguration)
      -> TargetedPreview?

contextMenuInteraction(_:​previewForDismissingMenuWithConfiguration:​)

Returns the destination view to use when animating the appearance of the preview interface.

func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                              previewForDismissingMenuWithConfiguration configuration: ContextMenuConfiguration)
      -> TargetedPreview?

contextMenuInteraction(_:​willPerformPreviewActionForMenuWith:​animator:​)

Informs the delegate when a preview action begins.

func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                              willPerformPreviewActionForMenuWith configuration: ContextMenuConfiguration,
                              animator: ContextMenuInteractionCommitAnimating)

contextMenuInteraction(_:​willDisplayMenuFor:​animator:​)

Informs the delegate when a menu display begins.

func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                              willDisplayMenuFor configuration: ContextMenuConfiguration,
                              animator: ContextMenuInteractionAnimating?)

contextMenuInteraction(_:​willEndFor:​animator:​)

Informs the delegate when a menu display ends.

func contextMenuInteraction(_ interaction: ContextMenuInteraction,
                              willEndFor configuration: ContextMenuConfiguration,
                              animator: ContextMenuInteractionAnimating?)