UIMenuController instance presents the menu interface for the Cut, Copy, Paste, Select, Select All, and Delete commands.
- iOS 3.0+
This menu is referred to as the editing menu. When you make this menu visible,
UIMenuController positions it relative to a target rectangle on the screen; this rectangle usually defines a selection. The menu appears above the target rectangle or, if there is not enough space for it, below it. The menu’s pointer is placed at the center of the top or bottom of the target rectangle, as appropriate. Be sure to set the tracking rectangle before you make the menu visible. You are also responsible for detecting, tracking, and displaying selections.
UIResponderStandardEditActions informal protocol declares methods that are invoked when the user taps a menu command. The
canPerformAction(_:withSender:) method of
UIResponder is also related to the editing menu. A responder implements this method to enable and disable commands of the editing menu just before the menu is displayed. You can force this updating of menu commands’ enabled state by calling the