问题描述:

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
相关阅读:
Top