2011-12-13 63 views
1

我在一個頁面的UITabBarController之間切換時,有一個UIView動畫的問題。的iOS的UIView動畫問題

在UIViewControllerA視圖是打下面的動畫: -

[UIView animateWithDuration:1.0 delay:0.0 options:UIViewAnimationOptionRepeat | UIViewAnimationOptionCurveLinear | UIViewAnimationOptionBeginFromCurrentState animations:^{ 
     CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI); 
     self.animationImageView.transform = transform; 
    } completion:NULL]; 

動畫是一個自定義的負重輪,當一首歌曲已經加載其停止。

如果我的網頁,即,從向UIViewControllerA UIViewControllerB之間,然後在一個UITabController回到A切換動畫停止。當我嘗試重新啓動時,它不再生動畫。

回答

3

答案很簡單,重新設置變換:

self.animationImageView.transform = CGAffineTransformIdentity;