• 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
coreAnimation CALayers and NSViews, which to use ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coreAnimation CALayers and NSViews, which to use ?


  • Subject: coreAnimation CALayers and NSViews, which to use ?
  • From: Nicolas Berloquin <email@hidden>
  • Date: Wed, 13 Jan 2010 16:43:29 +0100

Hi !

I'm new to coreAnimation, and there is something that I don't grasp yet.
I'd like to composite a series of images (sometimes a few hundred) inside a
view.
Those images will sometimes remain where they are, or be resized or moved
around.
>From what I understand, backing an NSView with a CALayer brings an optimized
rendering
pipeline (I guess using the GPU etc).
>From the docs, CALayers are described as model objects, used to orchestrate
the drawings
and animations. Alright.
But the docs also describe how to use CALayer delegates to handle the actual
drawing
(drawLayer: inContext:).
So this is getting me a bit confused.

I've started to create a simple view hierarchy with a scrollview and an
NSView in it, in IB, and I
checked the wants coreAnimation layer on my NSView.
Should I then override drawRect: in my view and draw each of my images there
(intersecting the visible rect),
or rather should I not create an NSView, and add programmatically a CALayer
to the
scrollview and override drawLayer: inContext: and do the drawing there ?
Or (but this sound much heavier) should I add many NSViews or NSImageViews
to the
backing layer and move/resize them afterwards ?

hmmmmm

any light on this will be more than welcome !

thanks
_______________________________________________

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: coreAnimation CALayers and NSViews, which to use ?
      • From: David Duncan <email@hidden>
  • Prev by Date: Scaled NSImage size of NSImageView?
  • Next by Date: Re: Cocoa-dev Digest, Vol 7, Issue 57
  • Previous by thread: Re: Scaled NSImage size of NSImageView?
  • Next by thread: Re: coreAnimation CALayers and NSViews, which to use ?
  • Index(es):
    • Date
    • Thread