Reputation: 323
I have the strange problem, that I cannot set shadows for my (layer-backed) views anymore since upgrading to 10.8.
NSShadow *shadow = [[NSShadow alloc] init];
[shadow setShadowColor:[NSColor darkGrayColor]];
[shadow setShadowOffset:NSMakeSize(0.0, -2.0)];
[shadow setShadowBlurRadius:2.0];
[[self imageView] setWantsLayer:YES];
[[self imageView] setShadow:shadow];
This code snippet worked fine in 10.7 Lion, but does not since the OS upgrade.
I have also created a test project, where I only add an image view via IB and set these shadow properties. This does not work either.
I also downloaded Apples sample code named "CocoaSlides" where they also use layer-backed views and NSShadow. It workes fine there, but the calls seem to be the same as mine.
Has anyone already come across this problem? Did you find a solution?
Upvotes: 2
Views: 631