i have an animation that works in the main menu screen of an iPad application. when select some menu item, the application will push the new view the navigation controller. the problem happens when i want to restart the animation again in the moment of when i push the back button and return to the main menu again.
i tried to put the animation code in these methods :
-(void) viewDidLoad
-(void) viewDidAppear
but i can't get them to work.
what i am trying to do is animation the company's logo in the background .
my code is :
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:15.0];
[UIView setAnimationRepeatCount:20.0f];
[UIView setAnimationRepeatAutoreverses:YES];
CGPoint pos = large_bright.center;
pos.x = 400.0f;
large_bright.center = pos;
CGPoint pos2 = large_dim.center;
pos2.x = -10.0;
large_dim.center = pos2;
[UIView commitAnimations];