Menus and Shortcuts

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

Topics

Inline Edit Menus

class UIMenuController

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

class UIMenuItem

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

protocol UIResponderStandardEditActions

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

App Menus

class UIMenu

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

protocol UIMenuBuilder

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

class UIMenuSystem

An object representing a main or contextual menu system.

Contextual Menus

class UIContextMenuInteraction

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

protocol UIContextMenuInteractionDelegate

The methods for providing the set of actions to perform on your content, and for customizing the preview of that 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.

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.

class UIMenuElement

An object representing a menu, action, or command.

class UIAction

A menu element that performs its action in a closure.

class UICommand

A menu element that performs its action in a selector.

class UIKeyCommand

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

struct UIMenuElement.Attributes

Attributes that determine the style of the menu element.

enum UIMenuElement.State

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.

class UIApplicationShortcutItem

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

class UIApplicationShortcutIcon

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

class 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.