Uppercase characters in UItextfield

前端 未结 17 1314
萌比男神i
萌比男神i 2020-12-24 04:34

I have a question about iOS UIKeyboard.

I have a UITextField and I would to have the keyboard with only uppercase characters.<

17条回答
  •  醉酒成梦
    2020-12-24 05:28

    The syntax is now

    Swift 2

    textField.autocapitalizationType = UITextAutocapitalizationType.AllCharacters
    

    Swift 3

    textField.autocapitalizationType = .allCharacters
    

提交回复
热议问题