MainstreamDeveloper00
MainstreamDeveloper00

Reputation: 8556

How to disable text tips in UITextField?

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.

Upvotes: 3

Views: 982

Answers (3)

Midhun MP
Midhun MP

Reputation: 107221

You can set the setAutoCorrectionType: property of UITextField to UITextAutoCorrectionTypeNo

[yourField setAutoCorrectionType:UITextAutoCorrectionTypeNo];

Upvotes: 2

Keab42
Keab42

Reputation: 688

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;

Upvotes: 5

BP.
BP.

Reputation: 10083

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.

Upvotes: 6

Related Questions