Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change type of UIAlertView keyboard

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.

like image 313
George Friday Avatar asked Apr 14 '13 05:04

George Friday


1 Answers

I think you can do something like:

UITextField* tf = [alertView textFieldAtIndex:0];
tf.keyboardType = UIKeyboardTypeNumberPad;

See the UIAlertView and UITextInputTraits docs

like image 76
NG. Avatar answered Nov 07 '22 10:11

NG.