O'Reilly logo

Beginning iPhone® SDK Programming with Objective-C® by Wei-Meng Lee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Keyboard Inputs

WHAT YOU WILL LEARN IN THIS CHAPTER

  • How to customize the keyboard for different types of inputs

  • How to make the alphanumeric keyboard go away when you are done typing

  • How to hide a numeric keyboard

  • How to detect when a keyboard is visible or not

  • How to shift views to make way for the keyboard

One of the controversial aspects of the iPhone is the multitouch keyboard that allows users to input data into their iPhone. Critics of the iPhone have long lamented its lack of a physical keyboard for data entry, whereas ardent iPhone supporters swear by its ease of use. Although many mobile platforms have long experimented with virtual keyboards, none is as successful as the iPhone in its implementation.

What made the iPhone keyboard so powerful is its intelligence in tracking what you type, followed by suggestions for the word you are typing, and automatically correcting the spelling and inserting punctuation for you. What's more, the keyboard knows when to appear at the right time — it appears when you tap a TextField view, and it goes away automatically when you tap a non-input view. Also, it lets you input data in different languages.

For iPhone application programmers, the key concern is how to integrate the keyboard into your application. How do you make the keyboard go away when it is no longer needed? And how do you ensure that the view the user is currently interacting with is not blocked by the keyboard? In this chapter, you learn about various ways to deal with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required