Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TextField Keyboard startup in Number mode

Tags:

iphone

api

I need the UITextField "ASCII Capable" keyboard to come up in numeric mode. I can't find an API for this, what am I missing?

like image 572
zaph Avatar asked Dec 11 '09 20:12

zaph


1 Answers

Assuming you have a UITextField named textField, all you need to do is call the method:

[ textField setKeyboardType:UIKeyboardTypeNumbersAndPunctuation ];

You may need to call this before the keyboard is displayed.

like image 178
Jeff Kelley Avatar answered Oct 18 '22 21:10

Jeff Kelley