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

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


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

Greetings,

I posted this question to the Mac OS X/Graphic/Core Animation forum several weeks ago and no one's been able to answer it, so I'm trying here.

I have a fairly complex hierarchy of NSViews (window -> split view -> tab view, which hosts a variety of table, outline, browser, and matrix views). Many of these subviews host CALayers that perform a variety of animation. So far, so good.

Now, there's a sister NSView that overlaps the split view (yes, it's "above" the split view, I create it programmatically with -addSubview:positioned:relativeTo: using NSWindowAbove). It too hosts an CALayer that's used to overlay semitransparent graphics on top of the other views, illustrating relationships between items in the other table views.

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.

Anyway, I'm looking for a solution that will get my overly graphics view to always draw it's CALayers on top of the images drawn by the nested views behind it.

--
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


  • Follow-Ups:
    • Re: CALayers in seperate, overlapping, NSViews don't overlap correctly
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Drag & Drop in an NSOutlineView
  • Next by Date: Drag image creation for NSView with CALayer in NSCollectionView calls drawRect:?
  • Previous by thread: Re: Drag & Drop in an NSOutlineView
  • Next by thread: Re: CALayers in seperate, overlapping, NSViews don't overlap correctly
  • Index(es):
    • Date
    • Thread