【问题标题】:iOS 5 - Is there a way to disable autofill in a UITextView but keep the spell check (red underline)?iOS 5 - 有没有办法在 UITextView 中禁用自动填充但保留拼写检查(红色下划线)?
【发布时间】:2012-08-01 22:46:37
【问题描述】:
似乎设置 autocorrectionType 会启用或禁用 (1) 键入时自动填充单词和 (2) 拼错单词时显示红色下划线。
在设置应用程序中,“自动更正”和“检查拼写”有单独的滑块。
我想知道是否有任何方法(可能通过解决方法)在 UITextView 中为拼写错误的单词添加下划线,但不使用 Objective-C 以编程方式自动填充?
非常感谢任何帮助!
【问题讨论】:
标签:
objective-c
ios
ipad
autocorrect
【解决方案1】:
还有一个“spellCheckingType”属性:
[textView setAutocorrectionType:UITextAutocorrectionTypeNo];
[textView setSpellCheckingType:UITextSpellCheckingTypeYes];
我试过了,它不会自动更正,但会留下红线和建议。