• 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: Drawing in CALayers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing in CALayers


  • Subject: Re: Drawing in CALayers
  • From: Erik Buck <email@hidden>
  • Date: Tue, 17 Jun 2008 13:50:20 -0700 (PDT)

I am a little bit confused by Scott's statement that "if you use layers-hosting views, then you should not rely on view drawing at all ... conversely, if you use layer-backed views then you should not directly access the views."

  I may just misunderstand what Scott means, but I have used layer-backed views with great success.  In a typical scenario, I implement a custom NSView subclass just like I would before Core Animation Layers.  To animate the view's drawing, I use a timer to trigger calls to -setNeedsDisplay: and implement -drawRect: to draw whatever stage of the animation is appropriate based on the current time. I have not had any problems when my ordinary custom views become layer backed... I don't think...  And I get transparency and layering over opengl content for "free" with layer-backed views.

  I used to do similar things before Core Animation too.  Apple provided an "overlay view" sample that did the same things.
_______________________________________________

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: Drawing in CALayers
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Rethinking my approach; rather overwhelmed.
  • Next by Date: Re: NSOutlineView and weird binding behaviour
  • Previous by thread: Re: Drawing in CALayers
  • Next by thread: Re: Drawing in CALayers
  • Index(es):
    • Date
    • Thread