How do I add a custom UIMenuItem to the UIMenuController in a UITextView?

Viewed 13617

I'm trying to add a menu item next to the "copy", "paste" items in a UITextView. I've created a subclass of UITextView and copied the example from apple's docs here:

http://developer.apple.com/iphone/library/documentation/General/Conceptual/iPadProgrammingGuide/Text/Text.html#//apple_ref/doc/uid/TP40009370-CH8-SW28

I simply created a UiTextView in IB and set its class to my CustomTextView class. Unfortunately this didn't work. Although, if I set my CustomTextView to a subclass of UIView, it works great. Any help here?

I've also made a very simple example project of my situation here:

apps.popsweet.com/TextViewTrial.zip

2 Answers
Related