Contents

UIContextMenuInteractionDelegate

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

Declaration

@MainActor protocol UIContextMenuInteractionDelegate : NSObjectProtocol

Mentioned in

Overview

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.

For additional information about how to implement contextual menus, see Adding context menus in your app.

Topics

Providing the preview configuration data

Customizing the preview animations

Responding to the menu’s appearance

Handling animations

Deprecated

See Also

Contextual menus