January 2012
Beginner
655 pages
16h 35m
English
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
Answers to the exercises can be found in Appendix D.
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 ... |