• 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
CALayer z-ordering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CALayer z-ordering


  • Subject: CALayer z-ordering
  • From: Ivy Feraco <email@hidden>
  • Date: Wed, 16 Sep 2009 11:42:32 -0400

Hi

I think am experiencing problems with CALayer z-ordering.
When I resize a superview, all its regular subviews become hidden/ obstructed (which is what I want), while the subviews with CALayer remain drawn on top of the superview.
I have experimented with both layer-backed and layer-hosting to see if that would solve my problem, as well as setting z-order.


I have a view (progressView) in a nib that gets loaded and added as a subview to a superview.
In the nib, progressView has an NSProgressIndicator.


In my code,  I create a layer (aViewLayer) in progressView with

CALayer * aViewLayer = [CALayer layer];
[[self view] setLayer:aViewLayer];
[[self view] setWantsLayer:YES];

Then I create two other sublayers (iconSublayer and textSublayer) and add them as sublayers to aViewLayer, and position them around the progress indicator.
iconSublayer gets content from setContent, while textSublayer uses the delegate method drawLayer:inContext:


I think this is a pretty normal setup, but I don't know why the views (progressViews) with CALayers get drawn on top despite the fact that they are sublayers of a subview.
Shouldn't they be placed on a lower z-order since they are down further in the hierarchy?
Any ideas?
Ivy Feraco


_______________________________________________

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: CALayer z-ordering
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Retrieving the selected object in an NSOutlineView.
  • Next by Date: Re: Filtering a table view using NSSearchField
  • Previous by thread: Re: Binding a model's ivar array to the contents of an NSArrayController
  • Next by thread: Re: CALayer z-ordering
  • Index(es):
    • Date
    • Thread