Fiducial13 Fiducial13 - 6 months ago 31
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?

let textFieldOutput = "Wait a moment, please."
let newString = textFieldOutput.uppercaseString
//The string is now "WAIT A MOMENT, PLEASE."