6

Developing a iPhone application - where I want the 'Spell checker' functionality to be turned off when the application starts, firstly, is this possible? if yes, can someone help me with the code for the same?

Secondly, if this is possible, and what would happen, if the user pauses my application, and goes and starts another application, for instance sending a SMS where by default the iOS turns on the spell checker - when the user would switch back to my app, would the spell checker be turned on then?

2 Answers 2

14

Whether or not it’s enabled is a property of the text field, not of your application. It’s specified in the UITextInputTraits protocol; to disable autocorrection on a text field, you’d do this:

[myTextField setAutocorrectionType:UITextAutocorrectionTypeNo];
3
  • Thanks! The app takes input from the users - in 50 odd screens so I guess this code will take care of the same. Feb 24, 2011 at 18:15
  • 3
    You can also do this in Interface Builder, check the Attributes Inspector for your UITextField/UITextView for the Correction Text Input Trait and set it to No.
    – BP.
    Feb 24, 2011 at 18:15
  • @BP, that should be an answer. I nearly missed it. May 18, 2013 at 19:10
0

You can do this by checking out the attributes when you select the UITextField or UITextView options

Your Answer

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

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