2

In our OS X application, we have enabled window shadow by view.window?.hasShadow = true. This will create a fine shadow over NSWindow. We have created a hole in the application by a custom view to see the background through it, via its mask layer.

Our problem is that the shadow is visible in the hole region too. Can we make the shadow not appear in the transparent region. We have searched, but didn't get anything to clip window shadow at certain area.

This shadow is creating some problem in the application

  1. We have given a button to collapse/expand the view which have the hole. So the hole will enlarge and shrink according to that. At this time window will not recalculate the shadow. We have tried the view.window?.invalidateShadow(). But it doesn't has any effect.
  2. We are drawing some texts over the transparent region. When the expand collapse happens we can see the traces of the text drawn. It will always be there.

Every thing comes fine if we resize the application, which will recalculate the shadow. How we can overcome these issue. What will be the work around.

0 Answers0