Instance Method

contextMenuInteraction:previewForDismissingMenuWithConfiguration:

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

Declaration

- (UITargetedPreview *)contextMenuInteraction:(UIContextMenuInteraction *)interaction previewForDismissingMenuWithConfiguration:(UIContextMenuConfiguration *)configuration;

Parameters

interaction

The interaction object that triggered the preview.

configuration

The configuration object associated with the current interaction.

Return Value

An object containing the destination view and configuration parameters for the animation.

Discussion

When the user dismisses the preview interface, UIKit animates that interface to the view you specify in the returned UITargetedPreview object.

See Also

Customizing the Preview Animations

- contextMenuInteraction:previewForHighlightingMenuWithConfiguration:

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

Adding Menus and Shortcuts to the Menu Bar and User Interface

Provide quick access to useful actions by adding menus and keyboard shortcuts to your Mac Catalyst app.