문제

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?

도움이 되었습니까?

해결책

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

[view setWantsLayer:YES];
[view setAlphaValue:0];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top