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


@protocol UIContextMenuInteractionDelegate


Use this protocol to provide UIKit with the contextual menu that you want to display. When a UIContextMenuInteraction object detects an appropriate interaction, it calls the contextMenuInteraction:configurationForMenuAtLocation: method of your delegate. You use that method to specify the basic configuration details for your interface. In addition to your contextual menu, you can tell UIKit whether you want it to display a default preview interface or a custom view controller that you provide. You can also specify options for how you want UIKit to animate the presentation and dismissal of that interface.


Providing the Preview Configuration Data

- contextMenuInteraction:configurationForMenuAtLocation:

Returns the configuration data to use when previewing the content.



An object containing the configuration details for the contextual menu.

Customizing the Preview Animations

- contextMenuInteraction:previewForHighlightingMenuWithConfiguration:

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

- contextMenuInteraction:previewForDismissingMenuWithConfiguration:

Returns the destination 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 app built with Mac Catalyst.

Responding to the Menu's Appearance


Methods adopted by system-supplied animator objects when committing preview-related animations.


Inherits From

See Also

Contextual Menus


An interaction object that you use to display relevant actions for your content.


An object describing the view to use during preview-related animations.


An object that specifies the container view to use for animations.


Additional parameters to use when animating a preview interface.