-4

How do I disable text highlighting in a UITextField or UITextView? I come from a web development background and I know it can be achieved in CSS using the following:

-webkit-touch-callout:none;
-webkit-user-select:none;
-webkit-tap-highlight-color:rgba(0,0,0,0);

Is this possible in iOS?

Anthony4
  • 92
  • 6

1 Answers1

2

The quickest way is to set .isUserInteractionEnabled to false on your UITextView or UITextField

cyril
  • 3,020
  • 6
  • 36
  • 61