I have a UIScrollView
with a block of text in a UITextView
. The text could be any amount of words coming from a server.
I want the scroll view to be the correct scroll size to match the size of the UITextView
.
What is the current practice to do this?
Screenshot:
You can use something like below to get the height for your textview
or there is a littl hack you can use :p Use a Label to get the height for your text view.
Now use this tempLabel's height
UITextView is an extension of UIScrollView. So you can get its content size using contentSize propery.