Class

UIContextMenuConfiguration

An object containing the configuration details for the contextual menu.

Declaration

@interface UIContextMenuConfiguration : NSObject

Overview

Before displaying a contextual menu, the system asks your UIContextMenuInteractionDelegate to provide a UIContextMenuConfiguration object with details about that menu. In your contextMenuInteraction:configurationForMenuAtLocation: method, use the location parameter to determine where the interaction occurred, and use the content at that location to configure your contextual menu and view controller. Provide custom blocks to generate:

  • The contextual menu with the actions for your content.

  • An optional view controller to use when displaying your content.

If you specify a default object without any custom handler blocks, the system displays a default preview interface with no menu.

Topics

Creating the Menu Configuration Object

+ configurationWithIdentifier:previewProvider:actionProvider:

Creates a menu configuration object with the specified action and preview providers.

UIContextMenuContentPreviewProvider

Returns the custom view controller to use when previewing your content.

UIContextMenuActionProvider

Returns an action-based contextual menu, optionally incorporating the system-suggested actions.

Getting the Configuration Identifier

identifier

The unique identifier for this configuration object.

Relationships

Inherits From

See Also

Providing the Preview Configuration Data

- contextMenuInteraction:configurationForMenuAtLocation:

Returns the configuration data to use when previewing the content.

Required.