3

Is there a way to disable useless and annoying pop up text tips in UITextField and UISearchBar like this on the screen?.

enter image description here

How can I do this?

I couldn't find any property responsible for this.

1
  • Useless and annoying? You know those are auto corrects right? I certainly find them useful and helpful. Be certain you want to disable them as I hate fields that turn this off unnecessarily. Jan 4, 2013 at 16:19

3 Answers 3

6

If you have created your view in Interface Builder, click on the text field, and then from the Attributes inspector (4th icon of 6), set Correction to No. This seems to work for me.

5

I believe you need to set the autocorrectiontype for the text field:

http://developer.apple.com/library/ios/documentation/uikit/reference/UITextInputTraits_Protocol/Reference/UITextInputTraits.html#//apple_ref/occ/intfp/UITextInputTraits/autocorrectionType

So to switch it off I would use something along the lines of:

myTextField.autocorrectionType = UITextAutocorrectionTypeNo;
1
  • As @James Webster says in his comment on the original post, do make sure that you have a specific reason for disabling this functionality, there's a reason it's on by default.
    – Keab42
    Jan 4, 2013 at 16:25
2

You can set the setAutoCorrectionType: property of UITextField to UITextAutoCorrectionTypeNo

[yourField setAutoCorrectionType:UITextAutoCorrectionTypeNo];
1
  • 1
    @0x7fffffff: I was typing my answer, I saw his answer after posting this.
    – Midhun MP
    Jan 4, 2013 at 16:20

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.