我有一個動畫,需要重複,直到我決定停止它。iOS - 停止重複的UIAnimation?
單擊按鈕後如何停止動畫?
[UIView animateWithDuration:0.2 delay:0 options:(UIViewAnimationCurveLinear | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat) animations:^{
CGAffineTransform transform = CGAffineTransformMakeRotation(DEGREES_TO_RADIANS(5));
self.transform = transform;
} completion:^(BOOL finished){
}];
可能的重複[如何有一個處理程序重複UIView animateWithDuration?](http://stackoverflow.com/questions/6766955/how-to-have-a-handler-to-repeat-uiview-animatewithduration ) – sch 2012-03-18 00:07:28