When there are input views, UIKit might swap out the keyboard even when a text object is first responder, and it might show a keyboard-like input view on the developer's behalf for non-text objects.
An input view is a substitute for system keyboards that is assigned to the inputView property of a text view or a custom view. Another exception involves custom input views. The purpose of this behavior is to avoid excessive animations as a user moves between views that are largely, but not entirely, text fields. On the iPad, if a view controller modally presents its view using the "form sheet" style, the keyboard, once shown, is not hidden until the user taps the dismiss key or the modal view controller is programmatically dismissed. There are a couple of exceptions to this common behavior. If no other text object is selected, the system hides the keyboard if, on the other hand, the user selects another text object, it becomes first responder and the keyboard for that object is displayed. When the user taps another text object or taps a button to end editing, the current text object resigns first-responder status. When the user taps a text object, it automatically becomes first responder as a result, the system displays the keyboard and an editing session begins for that text object. In most cases, instances of the UITextField or UITextView classes send a sequence of similarly named messages to their delegates when there is a change (or impending change) in first-responder status for a given text object. To have these methods called, you must set the delegate properties of text fields and text views either programmatically or in Interface Builder.
Implementation of all protocol methods is optional.
The delegate must adopt the UITextFieldDelegate or UITextViewDelegate protocols and implement one or more of the protocol methods. The delegate of a UITextField or UITextView object is responsible for most of these tasks. Several programming tasks are associated with these simple purposes, including configuring the text object, accessing the current text, validating what the user enters, and displaying overlay views such as bookmark buttons in text fields. Text fields and text views have two main functions: to display text and to enable the entry and editing of text. Next Previous Managing Text Fields and Text Views