iOS 拼写检查器存储哪些信息?
我听说 Apple 的 UITextView 拼写检查器会对您在各个应用程序中键入的内容进行某种记录。我有一个安全的应用程序,其中拼写检查是一个有用的功能,但是我不希望将新单词记录到我的应用程序之外的某个位置。任何人都可以向我推荐一份 Apple 参考文档或技术说明,了解拼写检查会捕获哪些信息以及在何处捕获这些信息?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不确定这是否有很大帮助,但您可以使用 UITextChecker 类手动进行拼写检查,该类允许设置忽略单词列表:
更多信息:https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITextChecker_Class/Reference/Reference.html
您还可以通过以下方式检查该单词是否已学过:
Not sure if this helps much, but you could do spell checking manually with the UITextChecker class which allows setting a list of ignored words:
More here: https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITextChecker_Class/Reference/Reference.html
You can also check whether the word has been learned with:
我不确定,但使用 fseventer,学习单词“ TextEdit 中的 aple" 将该单词保存到
~/Library/Spelling/LocalDictionary
。忽略一个单词似乎根本不会修改文件系统,事实上,如果文档被关闭并且没有保存,并且打开了一个包含先前忽略的单词的新文档,则它不再被忽略。这与作为类方法的+learnWord:
和作为实例方法的-ignoreWord:
一致。因此,为了安全起见,您可能永远不会调用+learnWord:
,而是拥有自己的后端来持久/安全地存储被忽略单词的列表。I don't know definitively, but using fseventer, learning the word "aple" in TextEdit saves that word to
~/Library/Spelling/LocalDictionary
. Ignoring a word seems not to modify the filesystem at all, and indeed, if the document is closed and not saved, and a new document with that previously-ignored word is opened, it is no longer ignored. This is consistent with+learnWord:
being a class method, and-ignoreWord:
being an instance method. So for security, you could probably just never call+learnWord:
, and instead have your own backend to persistently/securely store a list of ignored words.