I’ve successfully setup a scroll view that move some text fields and a text view up in case they are hidden by keyboard. However, when the text view received some text that goes beyond the first line the next lines are obviously hidden by keyboard. So, I’m looking for a trick to move up/down the view each time a new line is added/removed into/from the UITextview instance.
Thx for helping,
Stephane
You can implement the
method on your UITextView delegate, count the number of newlines in the textviews text, calculate how far you have to scroll, and scroll. (This method is called every time the user types a character.)
Alternatively you can go the easier route and scroll far enough to display your entire
UITextView. If the user types more than fits into the textview, the textview will start scrolling automatically.