2

Check out the gif below, as you see the textview is normal. When I press the return button the top text gets clipped, when I enter a letter or press return again its fixed. After that the next return also clips the text. There is also unnecessary space created at the bottom.

enter image description here

Here is the code I use under UITextViewDelegate:

func textViewDidChange(textView: UITextView) {
    textView.h = textView.contentHeight
    contentTextContainer.h = textView.contentHeight + 20 //Unnecessary but..
}
Esqarrouth
  • 38,543
  • 21
  • 161
  • 168

0 Answers0