Contents

UIMenuItem

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

Declaration

@MainActor class UIMenuItem

Overview

Custom menu items appear in the menu after any validated system items. A UIMenuItem object has two properties: a title and an action selector identifying the method to invoke in the handling responder object. Targets aren’t specified; a suitable target is found via normal traversal of the responder chain. To have custom menu items appear in the editing menu, you must add them to the menuItems property of the UIMenuController object.

Topics

Creating a menu item

Accessing menu-item attributes

See Also

Deprecated classes