Gibt es eine Möglichkeit, eine CABasicAnimation anzuhalten?

Habe ich eine basic-spinning animation des iPhone. Gibt es irgendeine Möglichkeit, dass ich "pause" die animation so, dass die position der anzeigen beibehalten werden? Ich denke, ein Weg, dies zu tun wäre, um die animation auf "abgeschlossen" statt "entfernen" auf, wie soll ich das tun?

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"];

InformationsquelleAutor der Frage mclaughlinj | 2010-02-21

Schreibe einen Kommentar