当前位置: 动力学知识库 > 问答 > 编程问答 >

ios - textView, e.g, can not be selected?

问题描述:

But, okay this code works for me. I have one question. Why the text em textView, e.g, can not be selected? it does not select text to copy, for example.

this is the code I'm trying to figure out why blocks the selection of the text in view.

UIView.animateWithDuration(2, delay: 0.0, options:[UIViewAnimationOptions.Repeat, UIViewAnimationOptions.Autoreverse], animations: {

self.view.backgroundColor = UIColor.blackColor()

self.view.backgroundColor = UIColor.greenColor()

self.view.backgroundColor = UIColor.grayColor()

self.view.backgroundColor = UIColor.redColor()

}, completion: nil)

网友答案:

Try to add this if it is a UITextView:

textView.editable = true
textView.selectable = true
分享给朋友:
您可能感兴趣的文章:
随机阅读: