Dismissing the Keyboard

Run the application, add an item, and touch the text field with the item’s name. When you touch the text field, a keyboard appears onscreen, as you saw in your WorldTrotter app in Chapter 4 (Figure 13.7). (If you are using the simulator and the keyboard does not appear, remember that you can press Command-K to toggle the device keyboard.)

Figure 13.7  Keyboard appears when a text field is touched

Keyboard appears when a text field is touched

The appearance of the keyboard in response to a touch is built into the UITextField class as well as UITextView, so you do not have to do anything extra for the keyboard to appear. However, at times ...

Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.