Hamzah Malik
Hamzah Malik

Reputation: 2570

iOS - What do we call the type of menu which pops up, as seen when highlighting text

When you highlight text in iOS, a menu is shown giving options such as cut and copy, it floats above the text and is black. What is this called and how can i implement it in a tableview (to give options when a row is selected)

enter image description here

Upvotes: 0

Views: 240

Answers (2)

user5087998
user5087998

Reputation:

It is called UIMenuController.

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.

You can also provide your own menu items via the menuItems property. When you modify the menu items, you can use the update method to force the menu to update its display.

Upvotes: 1

Related Questions