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

SUMMARY

In this chapter, you learned various techniques for dealing with the keyboard in your iPhone application. In particular, this chapter showed you how to hide the keyboard when you are done entering data, how to detect the presence or absence of the keyboard, and how to ensure that views are not blocked by the keyboard.

EXERCISES

  1. How do you hide the keyboard for a UITextField object?
  2. How do you detect whether the keyboard is visible or not?
  3. How do you get the size of the keyboard?
  4. How do you display more views than the View window can display at any one time?

    Answers to the exercises can be found in Appendix D.

image WHAT YOU LEARNED IN THIS CHAPTER

TOPIC KEY CONCEPTS
Making the keyboard go away Use the resignFirstResponder method on a UITextField object to resign its First-Responder status.
Displaying the different types of keyboard displayed Modify the keyboard type by changing the text input traits of a UITextField object in the Attributes Inspector window.
Handling the Return key of the keyboard Either handle the Did End On Exit event of a UITextField object or implement the textFieldShouldReturn: method in your View Controller (remember to ensure that your View Controller class is the delegate for the UITextField object).
Making a Scroll View scrollable Set its frame size and content size. As long as the content size is larger than the frame size, the Scroll ...
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