Change duration of a running CAAnimation?
Change duration of a running CAAnimation?
- Subject: Change duration of a running CAAnimation?
- From: Oleg Krupnov <email@hidden>
- Date: Thu, 25 Nov 2010 20:40:57 +0200
Hi,
Is there a way to change the duration of an already running
CAAnimation, in order to change its speed?
The animation is added explicitly via [layer addAnimation: forKey:]
When I try to get the animation with [layer animationForKey:] and call
[animation setDuration:], I get an exception that I'm trying to modify
a readonly animation.
I know I could cancel the current animation and start a new one using
the current [layer presentationLayer]'s value as the fromValue, but
this is not convenient because my animation is repetitive and after
such a manipulation it will start from a wrong fromValue on the next
loop.
Thanks!
Oleg.
_______________________________________________
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