Reputation: 295
I have a UITextView and when i am entering data into that after 5-6 lines , the data is scrolling up and it cannot be seen. Is there any property that i can use to increase the height of UITextView as the text are entered more than height.
Pls suggest guys.
Upvotes: 3
Views: 1280
Reputation: 13783
Use this code to make the height of the UITextView be the same as the height of the content inside it.
CGRect frame = _textView.frame;
frame.size.height = _textView.contentSize.height;
_textView.frame = frame;
Upvotes: 1