• 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: More CALayer Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More CALayer Questions


  • Subject: Re: More CALayer Questions
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 8 Jul 2008 05:54:20 -0400

I've got a longer answer coming... but

There are two ways to interact with layers.

- making a view layer-backed (that is, the view and its subviews will use CALayers as a caching mechanism)
- using a view to host layers (inserting your custom layers into the layer hierarchy with the view's layer as the root layer)


in the first case, you should ignore the layers and not interact with them
in the second case you should ignore the view, with the exception of resizing, and do all the layer manipulation yourself.


Also, consider this. For the second case you should be making the layer yourself and setting it before you enable wantsLayer:. You've created the layer directly. The layer has no knowledge of the coordinate space and flipped-ness of the view it is in, and you didn't provide it.



On Jul 7, 2008, at 11:13 PM, Gordon Apple wrote:

You may be right that I shouldn't muck with the view's layer, but
should add my own base-layer, especially since it seems to be a mystery how
the view's layer responds to changes in the view.

_______________________________________________

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: More CALayer Questions
      • From: Steven W Riggins <email@hidden>
References: 
 >Re: More CALayer Questions (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: How to create to-many accessor methods at runtime
  • Next by Date: Re: More CALayer Questions
  • Previous by thread: Re: More CALayer Questions
  • Next by thread: Re: More CALayer Questions
  • Index(es):
    • Date
    • Thread