While this works well, I might add that if you don't have the Delegate set to the First Responder (Top item "delegates" under Outlets on the Nib Connections Inspector view (Command-2)) then no matter what, it won't dismiss that silly keyboard! I struggled for hours with that, and used a "touch anywhere else on the screen" workaround before figuring that out.
Frustrating, to say the least. Boy, do I miss VB6!
Phil
Huffco Consulting
www.huffcoconsulting.com
Quote:
Originally Posted by nobre84
You should implement the textfield delegate method below, it is called when you click the Done button on the keyboard
Code:
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder]; //dismiss the keyboard
//do whatever else you need with the text
|