UITextView disabling text selection
Issue How disable Copy, Cut, Select, Select All in UITextView has a workable solution to this that I've just implemented and verified:
Subclass UITextView
and overwrite canBecomeFirstResponder:
- (BOOL)canBecomeFirstResponder {
return NO;
}
Note that this disables links and other tappable text content.
I've found that calling
[textView setUserInteractionEnabled:NO];
works quite well.
UITextView
's selectable
property:
This property controls the ability of the user to select content and interact with URLs and text attachments. The default value is YES.