I'm having a hard time getting the UITextView
to disable the selecting of the text.
I've tried:
canCancelContentTouches = YES;
I've tried subclassing and overwriting:
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
(But that gets called only After the selection)
- (BOOL)touchesShouldCancelInContentView:(UIView *)view;
(I don't see that getting fired at all)
- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view;
(I don't see that getting fired either)
What am I missing?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With