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.

iOS Build an Interactive Story App with Swift Adding Sound Effects Repositioning the Text Field

Keyboard will not show

With keyboardWillShow, the keyboard appeared but covered the text field box. After entering keyboardWillHide code, the keyboard does not appear at all anymore.

2 Answers

anglin
anglin
8,105 Points

I'm not sure if this will help, but sometimes the simulator's default is to not show the keyboard. You can toggle the setting with shortcut cmd+K.

Things to Check:

  1. Did your keyboard only show when you click the text field? (It's only supposed to show when you click in the text field. It doesn't show right away when you run/load the app.)
  2. Does your keyboard hide when you hit enter on your computer keyboard or click "return" on the simulator keyboard? (It's only supposed to hide when you do either of those 2 actions.)

If your keyboard still doesn't show, then I'm not sure why.