我使用下面的代碼無限期動畫一個UIView:爲什麼我的應用程序轉到後臺時,我的無限UIView動畫會停止?
#define DEFAULT_ANIM_SPPED 0.6
#define INFINATE_VALUE 1e100f
[UIView beginAnimations:nil context:nil];
[UIView setAnimationRepeatAutoreverses:YES];
[UIView setAnimationRepeatCount:INFINATE_VALUE];
[UIView setAnimationDuration:DEFAULT_ANIM_SPPED];
CGRect tempFrame=myView.frame;
tempFrame.origin.y -= 30;
myView.frame=tempFrame;
[UIView commitAnimations];
如果我的應用程序轉到後臺,然後我回到它,這樣所有的動畫,現在停止。爲什麼會發生這種情況?
感謝您的有用的信息。 – 2011-01-13 04:41:16