Instance Method

initWithDelegate:

Creates a context menu interaction object with the specified delegate object.

Declaration

- (instancetype)initWithDelegate:(id<UIContextMenuInteractionDelegate>)delegate;

Parameters

delegate

The object that provides the contextual menu and responds to other interaction-related events. This object must adopt the UIContextMenuInteractionDelegate protocol.

Return Value

A new context menu interaction object with the associated delegate.

See Also

Creating a Context Menu Interaction Object

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.