iOS Autocapitalization


Example

Swift

textField.autocapitalizationType = .None

Objective-C

textField.autocapitalizationType = UITextAutocapitalizationTypeNone;

All options:

  • .None \ UITextAutocapitalizationTypeNone : Don't autocapitalize anything
  • .Words \ UITextAutocapitalizationTypeWords : Autocapitalize every word
  • .Sentences \ UITextAutocapitalizationTypeSentences : Autocapitalize the first word in a sentence
  • .AllCharacters \ UITextAutocapitalizationTypeAllCharacters : Autocapitalize every letter (i.e. caps lock)