Uiview animation not called after navigating from viewview controller

I give uianimation with infinite replays in viewDidAppear: below code

[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];

      

but when i navigate to some page using pushViewController and go back to the same view controller the viewDidAppear calls but the animation doesn't work. and works great when using presentViewController. Please help me with this. thank

+3


source to share


1 answer


Try calling [super viewDidAppear:YES];

before your animation code.



+2


source







All Articles