I have UITextField which have keyboard type Numpad. I want to be able to hide the keyboard, when user is done.
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return YES;
}
As numpad doesnt have a Return key to mark keyboard action as done. What can I do to pass a action to delegate resignFirstResponder
You can allow users to touch the background with a transparent UIButton and then resign the responder in the button selector method, or you can add a custom button to the keyboard.
It’s a bit of a complicated process to add buttons to the keyboard, but there’s a good tutorial here:
http://www.iphonedevsdk.com/forum/iphone-sdk-tutorials/7350-adding-subviews-custimize-keyboard.html