Re: proper use of QuartzCore
Re: proper use of QuartzCore
- Subject: Re: proper use of QuartzCore
- From: Matt Neuburg <email@hidden>
- Date: Fri, 25 Feb 2011 08:08:34 -0800
On Thu, 24 Feb 2011 00:47:53 +0100, Federico Tessmann <email@hidden> said:
>Hi there.
>I have to rotate an image continuously and I'm using now CALayers as the
>image containers and I'm rotating thous CALayers by setting its Transform
>property.
>
>Now I have two approaches to keep rotating these layers.
>
>1) Use a displayLink of 30 fps. Use CATransaction, setting
>setDisableActions:<http://developer.apple.com/library/mac/documentation/graphicsimaging/Reference/CATransaction_class/Introduction/Introduction.html#//apple_ref/occ/clm/CATransaction/setDisableActions:>
> to YES and setting each time the new Transform property of that layer.
>2) Compute where the layer would rotate to and use a CATransaction
>triggering an animation of 0.5 secs of duration and letting CoreAnimation do
>the intermediate steps for me.
>
>Which approach would give me better results and not consume too much CPU?
Your approach 2 sounds like the way Apple's Metronome example is implemented, so be sure to take a look at that. m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________
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