AbdAlWahab Fanr AbdAlWahab Fanr -4 years ago 95
Objective-C Question

How do I call the keyboard to show up or hide?

I want to show the keyboard up using an Activator Listener (if the phone gets shaken)

How do I call the keyboard using a command?

Answer Source
UIView* view = ...;
[view becomeFirstResponder];

or if that fails you could try:

[view performSelector:@selector(becomeFirstResponder) withObject:nil afterDelay:0];

If you're interested in getting different types of keyboards, you could do something like this beforehand:

UItextField* textField = ...;
[textField setKeyboardType:UIKeyboardTypeNumberPad];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download