Anton
Anton

Reputation: 4018

iOS 5 - Is there a way to disable autofill in a UITextView but keep the spell check (red underline)?

It seems like setting autocorrectionType either enables or disables both (1) the autofill of words as you type and (2) the red underline as you misspell a word.

In the Settings App, there are separate sliders for "Auto-Correct" and "Check Spelling".

I am wondering if there is any way (possibly via workaround) to keep misspelled words underlined in the UITextView but not autofill programmatically using Objective-C?

Any help is greatly appreciated!

Upvotes: 6

Views: 2749

Answers (1)

Justin Paulson
Justin Paulson

Reputation: 4388

There is also a "spellCheckingType" property:

[textView setAutocorrectionType:UITextAutocorrectionTypeNo];
[textView setSpellCheckingType:UITextSpellCheckingTypeYes];

I tried this and it will not autocorrect, but it leaves the red lines and suggestions.

Upvotes: 17

Related Questions