I am trying to disable editing in NSTextView but there doesn't seem to be any option there.All the other types have enabled property which when set to false are non editable but is there any for NSTextView?
Please do not forget that a class inherits the methods of its superClass. The superClass of NSTextView
is NSText
. And there you find the method
with the comment:
Controls whether the receiver allows the user to edit its text.
For SWIFT3, you need to set isEditable to false.
var isEditable: Bool A Boolean value that controls whether the text views sharing the receiver’s layout manager allow the user to edit text.
https://developer.apple.com/documentation/appkit/nstextview#overview
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With