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.

James Webster
  • 31,873
  • 11
  • 70
  • 114
MainstreamDeveloper00
  • 8,436
  • 15
  • 56
  • 102
  • `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. – James Webster Jan 04 '13 at 16:19

3 Answers3

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.

BP.
  • 10,033
  • 4
  • 34
  • 53
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;
Keab42
  • 688
  • 13
  • 28
  • 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 04 '13 at 16:25
2

You can set the setAutoCorrectionType: property of UITextField to UITextAutoCorrectionTypeNo

[yourField setAutoCorrectionType:UITextAutoCorrectionTypeNo];
Midhun MP
  • 103,496
  • 31
  • 153
  • 200