【发布时间】:2015-02-22 04:21:22
【问题描述】:
我有一个动画,它沿弯曲路径为图层设置动画,然后返回。我希望图层在自动反转开始之前暂停。Core Animation 有没有简单的方法来做到这一点?
这是我用来启动动画的代码。
CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
animation.duration = animationDuration;
animation.path = curvedPath;
animation.rotationMode = kCAAnimationRotateAuto;
animation.delegate = nil;
animation.autoreverses = YES;
[self.myView.layer addAnimation:animation forKey:@"cardAnimation"];
【问题讨论】:
标签: ios cocoa-touch core-animation