Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Setting a viewController to automatically push up when entering in text to a text field?

Hey guys. Trying to get a viewController to automatically scroll up when typing text into a text field. Anybody know what method I need to call for that?


2 Answers

Patrick Cooney
Patrick Cooney
12,216 Points

Keep going with the tutorial. Once you're done, move on to "Implementing Designs for The iPhone". Eventually you'll get to TPKeyboardAvoiding...

Got it. Thanks!

Sheesh. I must've been in a rush typing this up or really frustrated. I've created a viewController for my Ribbit app in the Self-destructing Application module. When expanding on the Sign-up screen to include more text fields in order to get more info from the user, when I test the app and try typing in one of the text fields, the keyboard/keypad pops up and blocks the "Sign Up" button down below. Is there a method in the UIViewController class that I could call to get it to scroll up once the keyboard or keypad is enabled? I tried using a UIScrollView and placing it on top of the View, but it's not helping. I'm assuming if there's something that needs to be done to make this work, it'll include the UIScrollView, but if anyone else has any tricks, please let me know!