wie zu stoppen core animation?

Ich bin die Animation einer Schaltfläche mit core animation jetzt auf eine bestimmte Bedingung, die ich aufhören wollen, dass die animation, wie verhindere ich, dass die animation?

hier ist die Methode zum animieren der Schaltfläche

-(void)animateButton:(UIButton *)btnName
{
    CABasicAnimation *pulseAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
    pulseAnimation.duration = .5;
    pulseAnimation.toValue = [NSNumber numberWithFloat:1.1];
    pulseAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    pulseAnimation.autoreverses = YES;
    pulseAnimation.repeatCount = FLT_MAX;

    [btnName.layer addAnimation:pulseAnimation forKey:nil];
}
  • auf die erste Prüfung, ich dachte, diese Frage sei "how to stop Einäscherung" 🙂
  • sorry! vergessen Sie den Raum
InformationsquelleAutor Rahul Vyas | 2009-10-14
Schreibe einen Kommentar