0

I have an app that has a scrollview with a bunch of different textviews in it (when you click on each one, a keyboard pops up and you can type into the textview). See the following pic:

enter image description here

Here's my problem. If I enter any more text than is entered there in the pic, it goes underneath the keyboard so you can't see what you're typing. Is there any way I can make it so that when you're typing and you get down to that last line the the pic, it will automatically continue to scroll up one line at a time so that it always shows what you're typing (with the most recent line right above the keyboard)?

Tim
  • 4,015
  • 8
  • 32
  • 47

1 Answers1

2

The best thing to do is to resize the textview when it becomes the first responder and when it resigns as first responder.

  1. Resize the textview to fit within visible area when the keyboard is showing
  2. Resize the textview to it's original size when done is pressed.

Check out this post as well. How to make a UITextField move up when keyboard is present?

Community
  • 1
  • 1
Trevor
  • 10,371
  • 1
  • 30
  • 40