I have my standard app setup, window with lots of views. From time to time I place an NSView over the top of everything, black with some transparency, to act an a dimmer/overlay.
I need this top overlay view to absorb all clicks so that any views underneath it can't be interacted with. E.g. an NSButton under this NSView won't be clickable.
How can I do this?
I have seen -(NSView *)hitTest:(NSPoint)aPoint
but I don't want to put this on every single subview with a rule to block clicks while the overlay view is present.
mouseDown:
(with nothing in it). – TheAmateurProgrammermouseDown
method as you mention. Thanks! Feel free to make it an official answer. – Josh Kahane