On Mar 26, 2012, at 8:17 PM, Kenneth Baxter wrote:

> Yes, that works if you are using pure CALayers - no problem there, but if you 
> are using layer backed views, it doesn't work - see e.g. 
> http://www.cocoabuilder.com/archive/cocoa/294950-problem-using-zposition-on-layer-backed-views.html
> 
> ...so it still looks as if layer backed views are out…

To be clear, you can do a limited number of things with layer-backed views. You 
can override -makeBackingLayer, for example, and customize the view's layer's 
appearance.

But AppKit has its own internal understanding of zPosition that will conflict 
with yours when you least expect it. You _can_ safely have a layer-hosting view 
(call -setLayer: before calling -setWantsLayer:) as a subview of a layer-backed 
view (call -setWantsLayer: without calling -setLayer:). You _cannot_ have a 
layer-backed view as a subview of a layer-hosting view, nor should you add, 
remove, or manipulate the layers and sublayers of a layer-backed view.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to