Close the keyboard on UITextField
问题 I'm a newbie developing for iOS devices. I inserted an UITextField on InterfaceBuilder, and I assigned with the code: @interface ComposeViewController : UIViewController { id <ComposeViewControllerDelegate> delegate; IBOutlet UITextField *notificationTitle; } How I could allow to close the keyboard when the user press the "Return" key? 回答1: Set the Delegate of the UITextField to your ViewController, add a referencing outlet between the File's Owner and the UITextField, then implement this