Re: NSView modifies CALayer's masksToBounds?
Re: NSView modifies CALayer's masksToBounds?
- Subject: Re: NSView modifies CALayer's masksToBounds?
- From: Mike Manzano <email@hidden>
- Date: Thu, 16 Apr 2009 18:17:43 -0700
The example in the docs say:
"CoreAnimationdoesn'tprovideameansforactuallydisplayinglayersinawindow
, theymustbehostedby
aview. Whenpairedwithaview, theviewmustprovideevent-
handlingfortheunderlyinglayers, whilethe
layersprovidedisplayofthecontent."
In the sample code, here is the example given to put a layer into a
view:
[theView setLayer: theRootLayer];
[theView setWantsLayer:YES];
Is this what you mean by a "layer-hosted view"? If so, does that mean
that theRootLayer is mine to manage as I wish?
Currently, I am just modifying the layer given to the view after I
call -setWantsLayer on it. How is this layer different from
theRootLayer in the example?
Thanks,
Mike
On Apr 16, 2009, at 5:33 PM, Kyle Sluder wrote:
On Thu, Apr 16, 2009 at 7:14 PM, Mike Manzano
<email@hidden> wrote:
Is there a way to stop an NSView from modifying its CALayer's
masksToBounds
property?
The layer that backs a layer-backed view is Not Yours(TM). If you
want control over the layer, you need to use a layer-hosted view.
This means you might have to do a lot more work to keep AppKit's view
of the world in sync with your layer tree.
--Kyle Sluder
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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