UITextField auto-capitalization type - iPhone App

CodeGuy picture CodeGuy · Aug 4, 2011 · Viewed 74.8k times · Source

Is there a way to set the autocapitalizationType for a UITextField so that the first letter of each word is capitalized by default?

This Is An Example Of What I Want

Answer

AlexVogel picture AlexVogel · Aug 4, 2011

Use textField.autocapitalizationType = UITextAutocapitalizationTypeWords;

For more information please read: UITextInputTraits Protocol Reference