Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Option Popup - Similar to Cut/Copy/Paste

For an app I'm developing I need some popup options, similar to how Cut/Copy/Paste is displayed when selecting text in a UITextView or UIWebView.

However, I'm having trouble finding what this kind of popup is called. Is there a public API for them, or is it something that has to be implemented from scratch?

like image 813
Tom W Avatar asked Dec 03 '22 00:12

Tom W


1 Answers

The class you want to look at is UIMenuController.

If memory serves, you will need to create an array of UIMenuItem instances to describe the custom actions, and add them to the UIMenuController singleton using 'setMenuItems:'.

like image 158
nzeltzer Avatar answered Dec 21 '22 10:12

nzeltzer