0

I have a UITextView in my app, is there any way I can detect if a user has selected it and copied the text inside?

OR

Is there anyway I can prevent the copy button from appearing?

Albert Renshaw
  • 17,282
  • 18
  • 107
  • 195

1 Answers1

0

If you want to disable copy, paste functions you should subclass UITextView and add this code to your new class:

- (BOOL)canBecomeFirstResponder
{
   return NO;
}

How to detect pasteboard events such as copying, pasting look here..

How disable Copy, Cut, Select, Select All in UITextView

or here..

How to disable copy paste option from UITextField programmatically

Community
  • 1
  • 1
B.S.
  • 21,660
  • 14
  • 87
  • 109