如何禁用 NSTextView 的自动完成 属性

How can I disable the autocomplete property of a NSTextView

当我的 NSTextView 的完成下拉列表出现时,文本已填充到 NSTextView 中。我怎样才能避免这种情况,使文本视图保持为空,或者只包含我输入的文本?

我在文档中找不到自动完成功能 属性。

看起来您可以在子类中覆盖 -insertCompletion:forPartialWordRange:movement:isFinal:。如果 isFinal 标志是 NO,什么也不做。如果是 YES,请拨打 super