Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


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!