views:

80

answers:

1

Hi All,

In my app I have a text field that takes some number input from user so i set the keyboard type to "Number Pad"but now i am stuck as to how should i dismiss it when user finishes giving input . i know i have to use the delegate method "textfieldShouldReturn" but the problem is that number pad dont have a return key.so is it necessary to add a custom done key on the keyboard or there is some other way out?

A: 

You need to add a background tap

-(IBAction)backGroundTap:(id)sender

in the dot h and then in the dot m file

-(IBAction)backGroundTap:(id)sender
[nameField resignFirstResponder];
[numberField resignFirstResponder];
PurplePilot
thx Purple.......but what is backgroundtap and nameField is the name of textfield? and what is nameField here?
Siddharth