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


class UIMenuItem : NSObject


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 are not 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.


Creating a Menu Item

init(title: String, action: Selector)

Creates and returns a menu-item object initialized with the given title and action.

Accessing Menu-Item Attributes

var title: String

The title of the menu item.

var action: Selector

A selector identifying the method of the responder object to invoke for handling of the menu command.


Inherits From

Conforms To

See Also

Inline Edit Menus

class UIMenuController

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

protocol UIResponderStandardEditActions

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