chakshu
chakshu

Reputation: 1392

uiview animation does not call after navigating back from a viewcontroller

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

Answers (1)

Timur Mustafaev
Timur Mustafaev

Reputation: 4929

Try to call [super viewDidAppear:YES]; before animation code.

Upvotes: 2

Related Questions