Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

First letter in UiTextField lowercase

How do you make it so that when you start typing on the keyboard after youve clicked on a UITextfield the first letter isn't a capital automatically?

like image 702
daihovey Avatar asked Apr 06 '11 07:04

daihovey


People also ask

How do you write the first letter in lowercase?

To use a keyboard shortcut to change between lowercase, UPPERCASE, and Capitalize Each Word, select the text and press SHIFT + F3 until the case you want is applied.

What do you call first letter capitalized?

Capitalization (American English) or capitalisation (British English) is writing a word with its first letter as a capital letter (uppercase letter) and the remaining letters in lower case, in writing systems with a case distinction. The term also may refer to the choice of the casing applied to text.


2 Answers

In Objective-C:

textField.autocapitalizationType = UITextAutocapitalizationTypeNone; 

In Swift:

textField.autocapitalizationType = .none 
like image 140
ySgPjx Avatar answered Oct 02 '22 11:10

ySgPjx


You can turn off auto-capitalization with the .autocapitalizationType property in the UITextInputTraits protocol.

textfield.autocapitalizationType = UITextAutocapitalizationTypeNone; 
like image 20
kennytm Avatar answered Oct 02 '22 13:10

kennytm