How can I open the iPhone phone keyboard programmatically?

advertisements

I don't want to call a number. I just want to open the phone keypad programmatically.

How can I do this?


I think you can add UITextField and hide it and then call becomeFirstResponder:

var textField : UITextField //Create and set hidden to true
textField.keyboardType = UIKeyboardType.PhonePad //keyboardType
textField.hidden = true

//To Fire keyboard
textField.becomeFirstResponder()