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

class UIContextMenuConfiguration

An object containing the configuration details for the contextual menu.

Customizing the Preview Animations

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

protocol UIContextMenuInteractionCommitAnimating

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


Inherits From

See Also

Contextual Menus

class UIContextMenuInteraction

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

class UITargetedPreview

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

class UIPreviewTarget

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

class UIPreviewParameters

Additional parameters to use when animating a preview interface.