Reputation: 1392
I am Giving a uianimation with Infinite repeats in viewDidAppear: by code given below
[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 am navigating to some page with pushViewController and returning back to same view controller the viewDidAppear is calling but the animation is not working . and works fine when using presentViewController.Can please any one help me with it. thanks
Upvotes: 3
Views: 129
Reputation: 4929
Try to call [super viewDidAppear:YES];
before animation code.
Upvotes: 2