0

text menu

Above is my image in that there was menu for cut,copy etc. So I added following code:

- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
     [[NSOperationQueue mainQueue] addOperationWithBlock:^{
         [[UIMenuController sharedMenuController] setMenuVisible:NO animated:NO];
         [self resignFirstResponder];

    }];
    return [super canPerformAction:action withSender:sender];
}

So I removed that pop up by adding above code but the blue color effect is still there when I double click on that link which is I embeded in textview

How to remove this blue color selection on textview? It appears when I double click on it. I do not want to appear that.

mbelsky
  • 6,093
  • 2
  • 26
  • 34
  • You want to disable selection or only the visual effect? http://stackoverflow.com/questions/11606007/change-uitextfield-and-uitextview-cursor-caret-color ? – Larme Jul 08 '16 at 11:20
  • i want to disable that blue effect means visualisation – user6325467 Jul 08 '16 at 11:57
  • Possible duplicate of [How disable Copy, Cut, Select, Select All in UITextView](http://stackoverflow.com/questions/1426731/how-disable-copy-cut-select-select-all-in-uitextview) – Basanth Jul 09 '16 at 11:38

1 Answers1

0

You could disable selection for the textview, you would need to subclass UITextView and override the method below, see this previous question, How disable Copy, Cut, Select, Select All in UITextView.

- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
Community
  • 1
  • 1
JingJingTao
  • 1,760
  • 17
  • 28