Re: CALayer renderInContext changes zPosition of some child layers
Re: CALayer renderInContext changes zPosition of some child layers
- Subject: Re: CALayer renderInContext changes zPosition of some child layers
- From: Markus Spoettl <email@hidden>
- Date: Sat, 05 Jan 2013 18:46:52 +0100
Hello,
On 1/5/13 4:29 PM, David Duncan wrote:
>> On Jan 3, 2013, at 12:46 AM, Markus Spoettl <email@hidden> wrote:
I've been debugging this one for quite a while until I realized that
missing layers are not missing but somehow their zPosition got messed up so
they ended up below another sibling layer.
My best guess would be that -renderInContext: always renders in the same
order you get from the -sublayers array, without the zPosition sorting you
get on display. This is probably a bug, but your best work around would be to
sort the sublayers array yourself rather than relying upon zPosition to do
so. -- David Duncan
Indeed, changing the order in which the sub-layers are added such that higher
zPosition gets added later, makes it render correctly, so your assumption seems
correct. This is a huge step forward for static content but for layers
dynamically added when other layers are already visible it's a less than optimal
fix. I don't want to mess with my sublayers, remove and re-add them to fix
-renderInContext: behavior.
Anyway, thanks a lot for your response, it's very helpful!
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
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