So,
I am doing a simple animation with CABasicAnimation(as shown below).
CAAnimationGroup *theGroup = [CAAnimationGroup animation];
theGroup.fillMode = kCAFillModeForwards;
theGroup.removedOnCompletion = NO;
theGroup.delegate = self;
theGroup.timingFunction =[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
theGroup.duration = inDuration;
theGroup.repeatCount = 0;
theGroup.animations = [NSArray arrayWithObjects:rotationZ, theAnimationX, theAnimationY, nil];
[inLayer addAnimation:theGroup forKey:@"animateLayer"];
NSLog (@"ABCD");
Is there any method, for example -(BOOL) isAnimationCompleted;, so that I can know when the animation is complete?
I want to run the method immediately after the animation is complete. Any ideas?
source
share