• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CALayer renderInContext changes zPosition of some child layers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer renderInContext changes zPosition of some child layers


  • Subject: Re: CALayer renderInContext changes zPosition of some child layers
  • From: Thomas Bunch <email@hidden>
  • Date: Thu, 17 Jan 2013 13:43:48 -0800

On Jan 5, 2013, at 7:29 AM, David Duncan <email@hidden> 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.
>>
>> Since the affected layers need to be siblings in the same parent layer I can't fix this by making them sub-layers to enforce the hierarchy.
>>
>> Why does this happen and how can I fix it?
>
>
> 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.

I agree. The Core Animation Programming Guide says this:

“The zPosition property specifies the z-axis component of the layer's position. The zPosition is intended to be used to set the visual position of the layer relative to its sibling layers. It should not be used to specify the order of layer siblings, instead reorder the layer in the sublayer array.”

… but renderInContext: seems to have a more or less opposite philosophy.

-Tom

_______________________________________________

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


References: 
 >CALayer renderInContext changes zPosition of some child layers (From: Markus Spoettl <email@hidden>)
 >Re: CALayer renderInContext changes zPosition of some child layers (From: David Duncan <email@hidden>)

  • Prev by Date: Re: NSTextfield focus in contextual menu
  • Next by Date: Re: Changing color in NSColorPanel without message
  • Previous by thread: Re: CALayer renderInContext changes zPosition of some child layers
  • Next by thread: Re: LSSharedFileListInsertItemURL does not honor the display name or icon
  • Index(es):
    • Date
    • Thread