Skip to Content
Beginning iOS 5 Application Development
book

Beginning iOS 5 Application Development

by Wei-Meng Lee
January 2012
Beginner content levelBeginner
655 pages
16h 35m
English
Wrox
Content preview from Beginning iOS 5 Application Development

6

Handling Keyboard Inputs

WHAT YOU WILL LEARN IN THIS CHAPTER

  • How to customize the keyboard for different types of inputs
  • How to hide the keyboard when you are done typing
  • Detecting whether a keyboard is visible
  • Using ScrollView to contain other views
  • How to shift views to make way for the keyboard

One of the controversial aspects of the iPhone is the multi-touch keyboard that enables users to input data into their iPhone. Critics of the iPhone have pointed out its lack of a physical keyboard for data entry, whereas ardent supporters of virtual keyboards swear by its ease of use.

What makes 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. In addition, the keyboard knows when to appear at the right time — it appears when you tap a Text Field or Text View, and it goes away automatically when you tap a non-input view. You can also input data in different languages.

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering iOS 12 Programming - Third Edition

Mastering iOS 12 Programming - Third Edition

Donny Wals
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9781118144251Purchase book