2

I have a NSView in my OSX app use CALayer doing all sort of animations. This view is a layer host view which contains many small layers.

I want to add a NSVisualEffectView with NSVisualEffectBlendingModeBehindWindow blendingMode to support blur transparency effect on Yosemite.

The problem is when I turn off layer host view, the NSVisualEffectView works, but when I turn on the layer host view, the blur transparency effect goes away, leaving a blank white opaque background.

My question is: "is it possible to use a NSVisualEffectView with Layer host view? If it is doable, what is the approach here?"

vicegax
  • 4,709
  • 28
  • 37
lulu
  • 31
  • 3

1 Answers1

1

It turns out that I made a NSVisualEffectView to a layer host view which will cause this problem.

The solution is adding 2 views: the one below is a NSVisualEffectView. the one above is a NSView layer host view.

This will solve the problem.

lulu
  • 31
  • 3
  • can you elaborate a bit? I am facing the same issue with this layout hierarchy: http://i.imgur.com/LjWDzPZ.png When I enable the layer on the view, or just the scroll view, the blur effect goes away. – József Vesza May 07 '16 at 10:00