Xcode is a suite of tools, developed by Apple, for developing software for Mac OS X and iOS.
More information can be found at:
https://developer.apple.com/
Dismiss keyboard when editing UITextField
Information
A keyboard pops up when a user enters text in a Text Field.
When finished, the user presses the return button.
The keyboard must be dismissed.
Operating system used
Mac OS 10.7 (Lion)
Software prerequisites
Xcode 4.1
Procedure
- In the ViewController class implement method:
- (IBAction) textFieldFinishedWithKeyBoard:(id)sender {
return [sender resignFirstResponder];
}
- In InterfaceBuilder add a "Text Field" object.
- Right click File's Owner and connect action textFieldFinishedWithKeyBoard: with the "Text Field" object and event "Did End On exit".
|
|