First letter in UiTextField lowercase

前端 未结 11 1502
旧时难觅i
旧时难觅i 2020-12-24 04:45

How do you make it so that when you start typing on the keyboard after youve clicked on a UITextfield the first letter isn\'t a capital automatically?

11条回答
  •  半阙折子戏
    2020-12-24 05:30

    To avoid completely there are three properties that we can set

    textField.autocapitalizationType = .none;
    

    and

    textfield.autocorrectionType = .no;
    

    and

    textField.spellCheckingType = .no
    

    Only setting .autocapitalizationType = .none; works but better we set other both the properties to avoid capitalising from autocorrection and spell checking.

提交回复
热议问题