0

I have three animations. But I want to play these respectively, not at the same time. All of animations are instance of CABasicAnimation. How can i achieve this ?

Thanks.

1
  • Sequential / Chained / "One after another" CAAnimations has been asked for many times before. As the FAQ says: "Please look around to see if your question has been asked before." Commented Apr 29, 2013 at 9:57

1 Answer 1

0

A CABasicAnimation is a subclass of CAAnimation. CAAnimation has a delegate property. This delegate is called with

- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag 

when one animation did stop (either forced or finished).

So set your CABasicAnimation delegate and implement the animationDidStop:finished: delegate method, check that the animation has finished

- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { if (theAnimation == myFirstAnimation) if (flag) {} } } } 

and you are good to go.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.