I think the issue was by ths following , The idea is to set up a height constraint on the TextView, add key value observer for contentSize property of a textview, and then manipulate the height constraint of a TextView on each contentSize change. Please find a demo project here https://github.com/achikin/adjustabletextview
Swift swipe navigation adjusting view controller size
By : bhanutech
Date : March 29 2020, 07:55 AM
I hope this helps . Notice that using viewDidLoad for set frame manually is a bit risky and should be avoided since the bounds are not set. Instead use the viewDidLayoutSubviews to do that but take a look because the method is called all the time when the UI elements change including constraints.