Completely disable NSTextView spell checking

不想你离开。 提交于 2019-11-27 23:44:38

问题


How can I disable spell checking for an NSTextView? In particular, the red lines that are automatically drawn. I know about the "Continuous Spell Checking" option in Xcode, and every option I have found in the documentation related to spell checking doesn't seem to take the red lines away.


回答1:


Select NSTextView (doubleClick in IB on it because NSTextView is in NSScrollView by default or select it in Document Outline) and go to Attributes Inspector -> Linguistics -> and uncheck Continous Spell Checking here:

Result:




回答2:


I don't know what you tried, but [self.textView setContinuousSpellCheckingEnabled:NO]; worked for me.




回答3:


After unsetting continuousSpellCheckingEnabled clean your build folder and run again. Seems as though it is holding onto the setting between builds (quite surprisingly!). Your observation that changing the property name solved the issue led me to this solution -- still an issue almost five years after you asked.



来源:https://stackoverflow.com/questions/11806146/completely-disable-nstextview-spell-checking

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!