-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

Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87

1 Answers1

1

You need

self.lbl.topAnchor.constraint(equalTo:textView.bottomAnchor).isActive = true
Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87