I have an NSWindow
with 2 NSViews
(an NSSplitView
and a custom NSView
). Accessing the data to populate these views can take some time. During this period, I'd like to gray out the content of these views.
My first approach was to have a black third NSView
that covered the other 2 and achieve the graying out effect by changing its alpha value. However I've since learned having a hierarchy with sibling views is undefined.
What is the best approach here?
- Cache the
NSBitmapImageRep
of the 2 views, then replace them with the 3rd view, using the cached image(s) as background - Set the alpha value for each view separately (still not quite sure how to get the black background for the graying effect)
- Something I haven't considered