Disable auto correction of UITextField

后端 未结 6 2210
南笙
南笙 2020-12-14 05:34

When I try to edit texts in my iPhone application (UITextfield), it auto-corrects my input.

Could you let me know how can I disable this?

6条回答
  •  醉话见心
    2020-12-14 06:06

    You can use the UITextInputTraits protocol to achieve this:

    myInput.autoCorrectionType = UITextAutocorrectionTypeNo;
    

    See here for more details.

提交回复
热议问题