• 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: NSView modifies CALayer's masksToBounds?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSView modifies CALayer's masksToBounds?
      • From: Kyle Sluder <email@hidden>
References: 
 >NSView modifies CALayer's masksToBounds? (From: Mike Manzano <email@hidden>)
 >Re: NSView modifies CALayer's masksToBounds? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: -viewDidMoveToWindow without subclassing? NSViewController?
  • Next by Date: Re: Reading in dictionary from txt file: options for speed
  • Previous by thread: Re: NSView modifies CALayer's masksToBounds?
  • Next by thread: Re: NSView modifies CALayer's masksToBounds?
  • Index(es):
    • Date
    • Thread