UITextView disabling text selection

后端 未结 11 1099
误落风尘
误落风尘 2020-12-08 00:19

I\'m having a hard time getting the UITextView to disable the selecting of the text.

I\'ve tried:

canCancelContentTouches = YES;
         


        
11条回答
  •  [愿得一人]
    2020-12-08 00:53

    For swift, there is a property called "isSelectable" and its by default assign to true

    you can use it as follow:

    textView.isSelectable = false
    

提交回复
热议问题