Wojtek
Wojtek

Reputation: 1044

NSImageView transparency

I'm beginner with programming for OS X and I have problems with setting NSImageView transparency.

In iOS it was quite simple, there's property in UIImageView called alpha and I could change it and animate it. (like imageView.alpha = 0.5)

How can I achieve the same with NSImageView?

Upvotes: 3

Views: 2257

Answers (1)

Daij-Djan
Daij-Djan

Reputation: 50089

set the property alphaValue of a NSView that has a layer!

[view setWantsLayer:YES];
[view setAlphaValue:0];

Upvotes: 8

Related Questions