1
votes

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

1
When is the user "done"? Do you provide a button for them to indicate that they're done, or do they have to type in a number of a certain length...?kevboh

1 Answers

0
votes

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