iPhone の基本的な回転アニメーションがあります。ビューの位置が維持されるようにアニメーションを「一時停止」する方法はありますか? これを行う1つの方法は、アニメーションを「削除」する代わりに「完了する」ようにすることだと思いますが、どうすればよいですか?
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:rotationAnimation forKey:@"rotationAnimation"];