Reputation: 585
How do I specify that my keyboard for the UIAlertView
text field is to be a number pad keyboard? I am setting alertViewStyle
to UIAlertViewStylePlainTextInput
.
Upvotes: 10
Views: 5748
Reputation: 22904
I think you can do something like:
UITextField* tf = [alertView textFieldAtIndex:0];
tf.keyboardType = UIKeyboardTypeNumberPad;
See the UIAlertView and UITextInputTraits docs
Upvotes: 42