views:

24

answers:

1

Is the select control available as an API? when you select text you are presented with cut/copy..options I would like to add another one. is it possible if so how?

A: 

That's a UIMenuController, which has a property called menuItems, which is nil by default (no custom items), but you can add new UIMenuItems to it.

Dave DeLong
can i delete the default options?
Lisa
I wouldn't know without trying; the docs make it sound like you can't, but I'd have to experiment to be sure.
Dave DeLong
ok thanks anyways
Lisa
one more question: can I use UIMenuController to change the default behavior of the context menu of UIWebView? I want to add "Email Selection"
Lisa
@Lisa I'd imagine so. The `UIMenuController` is a singleton, so if you add a new item to it, it'll show up wherever the menu shows up, including a webview. Then somewhere along the responder chain you'll have to implement the method your menuItem needs in order to `emailSelection:`
Dave DeLong