0

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

Michael Petrotta
  • 58,479
  • 27
  • 141
  • 176
SampathKumar
  • 2,515
  • 8
  • 46
  • 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
  • 370
  • 3
  • 18
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,713
  • 2
  • 16
  • 47