5

How to activate Keyboard when UIButton is Clicked.

I do have button When I clicked the button I need to activate the keyboard.

For default when i click for UITextField it will activated..

How to Implement when UIButton. Just a Button clicked need to show Keyboard.

@thanks to all. in advance

Nicolas S
  • 5,325
  • 3
  • 29
  • 36
applelover
  • 136
  • 1
  • 11

2 Answers2

10
- (IBAction)buttonTapped:(id)sender
{
     [myTextField becomeFirstRespoder];
}
Russian
  • 1,296
  • 10
  • 15
3

call becomeFirstResponder

[myTextField becomeFirstResponder];

on the field which will receive the input from the keyboard after it's shown.

unbeli
  • 29,501
  • 5
  • 55
  • 57