我有一个基本的iPhone旋转动画。有什么方法可以“暂停”动画,以便维持视图的位置?我想这样做的一种方法是使动画“完成”,而不是对其调用“删除”,我该怎么做?
CABasicAnimation* rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2];
rotationAnimation.duration = 100;
rotationAnimation.cumulative = YES;
rotationAnimation.repeatCount = HUGE_VALF;
rotationAnimation.removedOnCompletion = NO;
rotationAnimation.fillMode = kCAFillModeForwards;
[myView.layer addAnimation:rotationAn
偶然的你
HUH函数
心有法竹