In the case of our Username text field, we could resign its first responder status and get rid of the keyboard by adding the following line of code to our
Calling the resignFirstResponder method tells the input object to give up its claim to the input control, hence the keyboard disappears.
There is a second common method for hiding the keyboard in iOS applications through the
Did End on Exit event of the field. This event occurs when the return or done keyboard button is pressed.
To add keyboard hiding to our
HelloXcode4_GUI application, follow these steps: