Re: CAAnimation - Letting it run without stopping when new animation is activated
Re: CAAnimation - Letting it run without stopping when new animation is activated
- Subject: Re: CAAnimation - Letting it run without stopping when new animation is activated
- From: Matt Long <email@hidden>
- Date: Fri, 20 Mar 2009 17:24:16 -0600
It won't stop them unless the fourth animation is animating the same
property as one of your other three. In that case you can just grab
the in-flight value of that property from the layer's
presentationLayer and set that as your fourth animation's fromValue.
-Matt
On Mar 20, 2009, at 5:16 PM, Filip van der Meeren wrote:
Will that work with animations that are already running?
I mean, if there are 2 or 3 animations running, and I kick off a
4th, won't that stop the 3 that are already running?
Filip van der Meeren
email@hidden
http://sourceforge.net/projects/xlinterpreter
On 21 Mar 2009, at 00:07, Matt Long wrote:
Use animation grouping. I you use groups, set beginTime with your
offset for each animation's time to start. The duration of each
animation must be the full duration of the entire animation put
together end to end. Your group animation should also have the same
duration. Here's some pseudo code.
[animation1 setDuration:15];
[animation1 setBeginTime:0];
[animation2 setDuration:15];
[animation2 setBeginTime:5];
[animation3 setDuration:15];
[animation3 setBeginTime:10];
[animationGroup setDuration:15];
[animationGroup setAnimations[NSArray arrayWithObjects:animation1,
animation2, animation3, nil]];
[layer addAnimation:animationGroup forKey:nil];
hth,
-Matt
On Mar 20, 2009, at 4:45 PM, Filip van der Meeren wrote:
Good evening (for me it is ;-) ),
I am trying to make a cool visual effect, to allow for this I need
to be able to start a CAAnimation for a CALayer positioning and
keep it running until it is done...
And here comes the tricky part, it needs to run even when other
animations are activated within the same layer. The animations are
triggered at different moments in time, I have tried to find a
solution. But each time the animation stops when another is
activated.
Any help here is welcome...
Thank you,
Filip van der Meeren
email@hidden
http://sourceforge.net/projects/xlinterpreter
_______________________________________________
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
_______________________________________________
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