当 viewWillAppear 或 viewDidAppear 被调用时,如何让我的动画再次运行?
这是我的动画:
bounceAnimation =[CABasicAnimation animationWithKeyPath:@"transform.scale"];
[bounceAnimation setToValue:[NSNumber numberWithFloat:1.4f]];
bounceAnimation.duration = 1;
bounceAnimation.repeatCount = 100000;
bounceAnimation.autoreverses = YES;
bounceAnimation.fillMode =kCAMediaTimingFunctionEaseInEaseOut;
bounceAnimation.removedOnCompletion = YES;
[startBtn.layer addAnimation:bounceAnimation forKey:@"bounceAnimation"];