Re: Problem using zPosition on layer backed views
Re: Problem using zPosition on layer backed views
- Subject: Re: Problem using zPosition on layer backed views
- From: Matt Neuburg <email@hidden>
- Date: Sun, 7 Nov 2010 07:58:31 -0800
On Sun, 31 Oct 2010 22:13:18 +1000, Gideon King <email@hidden> said:
>I have a view with several subviews, all layer backed. These subviews are siblings. I want to bring one of them in front of the others, so I set the zPosition of the others to a zPosition of 1 and the one I want in front to a zPosition of 2. Nothing happens - the one I want in front is still drawn behind the other ones. While I could reorder the subviews in the array, I really don't want to do that if I don't have to - I would rather use the zPosition.
>
>I have tried the same logic on pure layers and it works as expected, but for this application I need to use views.
>
>I have found some other places on the web where it appears that people are successfully using zPosition on layer backed views.
>
>Any suggestions as to what I may be missing?
View drawing order (back to front) is layer drawing order for the layers belonging to those views. Suppose view A has ten layers and view B has ten layers, and view A is before view B as a sibling. Then all of A's layers, regardless of their mutual z order, must be drawn before (and appear behind) all of B's layers. There is nothing you can do about this, and if you think you can, what you're missing is a fundamental understanding of what a layer is. m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden