There is a 'Done' button on the input pad on iphone, but there is no action to it by default. Can I add an action to it? For example, hide the input pad when 'Done' is pressed?
+4
A:
In your keyboard delegate you need to give up the focus. E.g
- (BOOL)textFieldShouldReturn:(UITextField *)aTextField
{
[aTextField resignFirstResponder];
return YES;
}
This works for both the done and return keys.
Andrew Grant
2009-02-25 01:23:03
Thanks, this works well.
iPhoney
2009-02-25 02:46:44