I know that on a NSWindow
you can use setIgnoresMouseEvents:
. However, a NSView
doesn't have either setEnabled:
or setIgnoresMouseEvents:
. Any fixes?
Implement the hitTest:
method to return nil
.
来源:https://stackoverflow.com/questions/6543240/disable-clicks-on-a-nsview