How to activate the keyboard when a button is pressed

How to activate the keyboard when pressing the UIButton button.

I have a button. When I pressed the button, I need to activate the keyboard.

By default, when I click on a UITextField, it is activated.

How to implement when UIButton. Just a button is pressed to display the keyboard.

@thanks for everyone. in advance

+3
source share
2 answers
- (IBAction)buttonTapped:(id)sender
{
     [myTextField becomeFirstRespoder];
}
+8
source

call becomeFirstResponder

[myTextField becomeFirstResponder];

in the field, which after entering will be displayed from the keyboard.

+2
source

All Articles