-2

I have a dynamic UITextView and need to add a UILabel right bellow. This label should always be 0 (touching) the bottom of the textView.

I have tried constraints like this but have not been able to make it work as intended.

self.dateOfComment.topAnchor.constraint(equalTo: 0).isActive = true

How can I make this functionality work?

I have looked here also

Sh_Khan
  • 93,445
  • 7
  • 57
  • 76

1 Answers1

1

You need

self.lbl.topAnchor.constraint(equalTo:textView.bottomAnchor).isActive = true
Sh_Khan
  • 93,445
  • 7
  • 57
  • 76