I have a textView which i use as an input field for chatMessages. I want it to expand if there is more text than could fit in one row.
func textViewDidChange(_ textView: UITextView) {
self.textViewHeight.constant = textView.contentSize.height
}
I set a height constraint programmatically if the user enters something inside the textView.
<- For one liners it looks fine.
<- After you press enter it gets hidden.
<- The second enter shows it up again.
What am i doing wrong here? I try to recreate the look of whatsapp / imessage, where this hiding does not happen.