Search code examples
iphoneuitextviewuimenucontroller

Hide UIMenuController using UIMenuControllerWillShowMenuNotification


I have a UITextView(not editable). When user tries to select text I want to hide the Select | Select All menu.

Is there a way by which I can hide using the Global notification UIMenuControllerWillShowMenuNotification, or is there any other way by which I can hide and Select | Select All menu?

Thanks a lot


Solution

  • Did you try overriding (BOOL)canPerformAction:(SEL)action withSender:(id)sender of UIResponder? That controls what menu options are shown in the menu.