• 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: CALayers in seperate, overlapping, NSViews don't overlap correctly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayers in seperate, overlapping, NSViews don't overlap correctly


  • Subject: Re: CALayers in seperate, overlapping, NSViews don't overlap correctly
  • From: James Bucanek <email@hidden>
  • Date: Mon, 14 Mar 2011 22:56:00 -0700

Kyle Sluder <mailto:email@hidden> wrote (Monday, March 14, 2011 1:33 PM -0700):

On Mon, Mar 14, 2011 at 1:13 PM, James Bucanek <email@hidden> wrote:
Here's the weird thing: sometimes, but not all the time, the CALayers in the
nested subviews draw ON TOP OF the CALayers in the top-level overlay view.
It's almost as if whatever the last CALayer that gets drawn, draws on top of
all of the other CAlayers in the window. This seems really strange, because
within a single CALayer, sublayers appear to be strictly ordered and always
draw over the layers behind them.

You're not putting subviews inside of layer-hosting views, are you?

No. None of the layer-hosting views have any subviews.

We have a simpler version of what you describe (a scroll view contains
both a layer-hosting document view as well as a layer-backed view
added with -addSubview:layerBackedView positioned:NSWindowAbove
relativeTo:[scrollView documentView]) that works fine. But the
layer-backed glue can be very fickle with view Z-ordering.

I don't have any layer-backed NSViews. I'm wondering if I should. If (for example) making the sibling NSSplitView a layer-backed view might help the situation?


I'm pretty sure I can solve this by moving the overlay NSView into a child window. This would force the overlay graphics into its own graphics buffer, but I'd like to avoid work that if I can.
--
James Bucanek


_______________________________________________

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: 
 >Re: CALayers in seperate, overlapping, NSViews don't overlap correctly (From: Kyle Sluder <email@hidden>)

  • Prev by Date: iOS 4.2 - Printing Quality
  • Next by Date: Re: Keyboard handlers
  • Previous by thread: Re: CALayers in seperate, overlapping, NSViews don't overlap correctly
  • Next by thread: Drag image creation for NSView with CALayer in NSCollectionView calls drawRect:?
  • Index(es):
    • Date
    • Thread