I\'m having a hard time getting the UITextView
to disable the selecting of the text.
I\'ve tried:
canCancelContentTouches = YES;
Did you try setting userInteractionEnabled to NO for your UITextView? But you'd lose scrolling too.
If you need scrolling, which is probably why you used a UITextView and not a UILabel, then you need to do more work. You'll probably have to override canPerformAction:withSender:
to return NO
for actions that you don't want to allow:
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
switch (action) {
case @selector(paste:):
case @selector(copy:):
case @selector(cut:):
case @selector(cut:):
case @selector(select:):
case @selector(selectAll:):
return NO;
}
return [super canPerformAction:action withSender:sender];
}
For more, UIResponderStandardEditActions .