0

How can I add an icon to the alphabetic keyboard in my iPhone app, that would hide the keyboard?

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
SampathKumar
  • 2,525
  • 8
  • 47
  • 82

2 Answers2

1

you can change the keyboard itself, but you can add toolbar with a button. You can set the toolbar as the accessory view of the textfield/textview (whatever you are using). And you can hide the keyboard in the action method of the button on the toolbar.

-(IBAction)buttonPressed:(id)sender {
      [myTextField resignFirstResponder];
}
Saleh
  • 380
  • 3
  • 19
0

In your .xib file, set the return key as you need, and set the delegate. And implement this method for resigning your keyboard on the done button click.(if it is a text field)

- (BOOL)textFieldShouldReturn:(UITextField*)txt
{

    [urTextFld resignFirstResponder];
}
iOS Developer
  • 1,723
  • 2
  • 16
  • 47