iPhone Force Textbox Input to Upper Case

hungbm06 picture hungbm06 · Jan 8, 2010 · Viewed 23.2k times · Source

How do I force characters input into a textbox on the iPhone to upper case?

Answer

Adam Woś picture Adam Woś · Jan 8, 2010

Set autocapitalizationType to UITextAutocapitalizationTypeAllCharacters on the UITextField.

See UITextInputTraits protocol (adopted by UITextField) for more details.