Re: [iPhone] CAKeyframeAnimation
Re: [iPhone] CAKeyframeAnimation
- Subject: Re: [iPhone] CAKeyframeAnimation
- From: David Duncan <email@hidden>
- Date: Wed, 12 Aug 2009 09:31:23 -0700
On Aug 12, 2009, at 7:17 AM, Sven wrote:
It works fine on the simulator but on the device it's REALLY slow.
If I set the duration to less than 5 seconds (for 25frames) the
animation doesn't even play and I end up at the last frame after a
pause on the previous screen.
The skipped initial frames is a known bug. There are ways to mitigate
it, but there are a lot of variables involved.
I have 25 frames each consisting of 376x540 pngs which are loaded in
before I start the animation. They are loaded into an array using
imageWithContentsOfFile.
I notice that the addAnimation call to add the animation to the
CALayer is taking quite a long time.
May I ask why you are using images that are bigger than the screen in
this case? If nothing else, your wasting memory. But the amount of
content you have (nearly 20MB of image data) is likely the most major
contributor to the issues your seeing.
Or perhaps a different approach to flip book these images?
What is the purpose of this animation? Also consider that if most of
the content is static you will probably want to break it into static
and animated pieces so you can reduce the amount of memory required.
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
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