When you’re using UITextView to allow user write on something, it’s height is not being changed. Then, if you consider to use UITextField, it’s not allowed to be written down more than 1 row.
What you have to do for it is just one line of code.
yourTextView.isScrollEnabled = false
And then your UITextView will be resized just like this.