Search code examples
uitextviewhideios5uimenucontroller

how to hide UIMenuController in iOS 5


In my app I need to select some text in UITextview(editable) but I don't want to show UIMenuController popover.

In previous iOS, I override

(BOOL)canPerformAction:(SEL)action withSender:(id)sender 

of UIResponder and set the return value to NO. But after I used IOS 5 GM, the UIMenuController popover still doesn't hide. I tried to set the return value to YES, but it's still the same. Can anyone tell me how to hide it in iOS5?

Thank you, regards,

Risma


Solution

  • See this answer. Basically need to subclass UITextView (or UIWebView). Works fine on iOS5 too.