How can I stop an UIViewAnimationOptionRepeat UIView Animation?
问题 I have the following code inside of a UIView subclass: [element setAlpha: 0.0f]; [UIView animateWithDuration: 0.4 delay: 0.0 options: UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat animations: ^{ [element setAlpha: 1.0f]; } completion: ^(BOOL finished){ if (finished) { return; } }]; Then when I want to stop the Animation I send the following message to the View itself: [[self layer] removeAllAnimations]; But it does nothing... How can I stop