Fiducial13 Fiducial13 - 1 year ago 79
Swift Question

How do I force a text field to be upper case only in Swift?

I would like the text entry on a text field to be upper case only.

Is there a way to limit the text field to output only upper case letters or even limit the software keyboard to only display upper case letters to users?

Answer Source
let textFieldOutput = "Wait a moment, please."
let newString = textFieldOutput.uppercaseString
//The string is now "WAIT A MOMENT, PLEASE."
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download