March 2012
Intermediate to advanced
590 pages
22h 48m
English
When the user selects a line, we want a menu to appear right where the user tapped that offers the option to delete that line. There is a built-in class for providing this sort of menu called UIMenuController. A menu controller has a list of menu items and is presented in an existing view. Each item has a title (what shows up in the menu) and an action (the message it sends the view it is being presented in).
Figure 20.3 A UIMenuController
There is only one UIMenuController per application. When you wish to present this instance, you fill it with menu items, give it a rectangle to present from, and set it to be visible. Do this ...
Read now
Unlock full access