Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone Force Textbox Input to Upper Case

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

like image 519
hungbm06 Avatar asked Jan 08 '10 11:01

hungbm06


People also ask

How do I make my phone keyboard all caps?

Just double-tap the shift key and a blue indicator will light up. You'll know you're in all caps because the letter keys will change to uppercase. When you're ready to switch back to lowercase, just tap the shift key once again.

How do you capitalize text in SwiftUI?

SwiftUI's TextField view normally lets users write their text in whatever case they want, but if you want to control that you can force either uppercase or lowercase text using the textCase() modifier.


1 Answers

Set autocapitalizationType to UITextAutocapitalizationTypeAllCharacters on the UITextField.

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

like image 121
Adam Woś Avatar answered Sep 22 '22 10:09

Adam Woś