Menus and Shortcuts

Simplify interactions with your app using menu systems, contextual menus, Home screen quick actions, and keyboard shortcuts.

Topics

Inline Edit Menus

UIMenuController

The menu interface for the Cut, Copy, Paste, Select, Select All, and Delete commands.

UIMenuItem

A custom item in the editing menu managed by the menu controller.

UIResponderStandardEditActions

A set of standard methods that apps can adopt to support editing.

App Menus

UIMenu

A container for grouping related menu elements in an app menu or contextual menu.

UIMenuBuilder

An interface for adding and removing menus from a menu system.

UIMenuSystem

An object representing a main or contextual menu system.

Contextual Menus

UIContextMenuInteraction

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

UIContextMenuInteractionDelegate

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

UITargetedPreview

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

UIPreviewTarget

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

UIPreviewParameters

Additional parameters to use when animating a preview interface.

Menu Elements and Keyboard Shortcuts

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 Catalyst app.

UIMenuElement

An object representing a menu, action, or command.

UIAction

A menu element that performs its action in a block.

UICommand

A menu element that performs its action in a selector.

UIKeyCommand

An object that specifies a key press performed on a hardware keyboard and the resulting action.

UIMenuElementAttributes

Attributes that determine the style of the menu element.

UIMenuElementState

Constants that indicate the state of an action- or command-based menu element.

Home Screen Quick Actions

Add Home Screen Quick Actions

Expose commonly used functionality with static or dynamic 3D Touch Home screen quick actions.

UIApplicationShortcutItem

An application shortcut item, also called a Home screen dynamic quick action, that specifies a user-initiated action for your app.

UIApplicationShortcutIcon

An image you can optionally associate with a Home screen quick action to improve its appearance and usability.

UIMutableApplicationShortcutItem

An item that specifies a configurable user-initiated action for your app (the item is also called a mutable Home screen dynamic quick action).

See Also

User Interactions

Touches, Presses, and Gestures

Encapsulate your app's event-handling logic in gesture recognizers so that you can reuse that code throughout your app.

Drag and Drop

Bring drag and drop to your app by using interaction APIs with your views.

Pencil Interactions

Handle double-tap interactions that a user makes on Apple Pencil.

Focus-based Navigation

Navigate the interface of your UIKit app using a remote or game controller.

Accessibility

Make your apps accessible to everyone, including people with disabilities.