我试图在 NSTextView 中禁用编辑,但那里似乎没有任何选项。所有其他类型都启用了属性,当设置为 false 时,该属性不可编辑,但 NSTextView 是否有任何选项?
最佳答案
请不要忘记类继承其父类(super class)的方法。 NSTextView
的父类(super class)是 NSText
。在那里你可以找到方法
- (void)setEditable:(BOOL)标志
带有评论:
Controls whether the receiver allows the user to edit its text.
关于macos - 禁用 NSTextView 中的编辑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29389816/