我在viewDidAppear中给出了无限重复的uianimation:通过下面给出的代码
[UIView beginAnimations:@"theAnimation" context:NULL];
[UIView setAnimationDuration:2];
[UIView setAnimationRepeatCount:FLT_MAX];
[UIView setAnimationRepeatAutoreverses:YES];
[startButton setAlpha:.5];
[UIView setAnimationDelegate:self];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView commitAnimations];
[super viewDidAppear:YES];
但是当我使用pushViewController导航到某个页面并返回到同一个视图控制器时,viewDidAppear正在调用,但动画无效。使用presentViewController时工作正常。请任何人帮助我。 谢谢
答案 0 :(得分:2)
尝试在动画代码之前调用[super viewDidAppear:YES];
。