Here is my code:
var messageView : UITextView = {
var textView = UITextView()
textView.text = \" Add your message here\"
textView.text
You need to set translatesAutoresizingMaskIntoConstraints
on the label to false
and isActive
to true
on the constraints. Basically your constrains code should look like this:
accessoryView.leadingAnchor.constraintEqualToAnchor(label.leadingAnchor, constant: 18).isActive = true
accessoryView.centerYAnchor.constraintEqualToAnchor(label.centerYAnchor).isActive = true