views:

88

answers:

1

I'm trying to perform some simple animations using CA layers on transparent window and corresponding view. The problem I have is that every time I turn on the layer backing (either through wantsLayer in code, or with IB) the view stops being transparent.

I've tried setting layer's backgroundColor to something with low alpha and I took few other rather obvious approaches, but it looks to me that I'm missing something.

To illustrate the problem better, let's just use sample Round Transparent Window project from developer.apple.com. With layer added (just this single line in awakeFromNib), the transparency goes away http://slonce.com/layers.png

Could anyone please give me some hints on this?

+1  A: 

Thanks to Dave Keck from cocoa-dev, the answer is:

[window setBackgroundColor: [NSColor clearColor]];
kodz