0
我有一個循環動畫這樣的:恢復UIView的動畫時,應用程序恢復
UIView.Animate(50, 0, UIViewAnimationOptions.Repeat | UIViewAnimationOptions.CurveLinear,() => {
bgBackground.Frame = new RectangleF(new PointF(-496, bgBackground.Frame.Y), bgBackground.Frame.Size);
},() => {});
但是,當應用程序被切換到後臺和動畫沒有運行。
我已經聽到了事件,當應用程序來到前臺,但我不知道如何重新啓動動畫。
我有另一個循環動畫使用CABasicAnimation,並且還在繼續運行時,所以我不能使用基於UIView動畫循環動畫?
其他類似的問題剛纔提供的CALayer動畫作爲解決方案:
- How to pause and resume UIView Animation?
- How to pause and resume UIView Animation (without Block Animation)?