Removing NSWindow Content

I have an NSWindow with 2 NSViews (a NSSplitView and a custom NSView ). Accessing data to fill out these submissions may take some time. During this period, I would like to denigrate the content of these ideas.

My first approach was to have a black third of NSView that covered the other 2 and achieved a gray hair effect by changing its alpha value. However, since then I have learned that the hierarchy with representations for sisters is undefined.

What is the best approach here?

  • Download NSBitmapImageRep from two views, then replace them with a 3rd view using the cached image as background
  • Set the alpha value for each view separately (still not quite sure how to get a black background for a graying effect)
  • Something that I did not consider
+3
source share
2 answers

I would use a child window. Set your content view to black (hopefully with status and progress information in subviews) and its alpha value until the desired fade out, and add it as a child window of the window whose contents you want to disappear.

+6
source

I would teach the sights how to make yourself disconnected, but there are other suggestions here:

How can I darken everything that is displayed in one NSView?

+2
source

Source: https://habr.com/ru/post/892088/


All Articles