On Thu, 24 Feb 2011 00:47:53 +0100, Federico Tessmann <federic...@gmail.com> 
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 = m...@tidbits.com, <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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to