iPhone Force Textbox Input to Upper Case

前端 未结 11 1654
无人共我
无人共我 2020-12-15 03:01

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

11条回答
  •  醉话见心
    2020-12-15 03:35

    Set autocapitalizationType to UITextAutocapitalizationTypeAllCharacters on the UITextField.

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

提交回复
热议问题