views:

269

answers:

2

Hi,

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

A: 

I would simply style a UILabel to look the way you want.

If the user can't edit the text view, why are you using it instead of a label?

Ben S
That's because I still want selectedRange. Basically get the cursor position and then perform some action based on it.
Mithin
I see. Disregard my answer then. I'll leave it up just so others don't say the same thing.
Ben S
A: 

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

AK