Hi there,
I'm having some difficulties with the animation. I want it to rotate when i launch the app (which it does). I also want it to work when I exit and reenter the app but it just stays there when I re enter the app. Here is my code:
Any help would be greatly appreciated! Thanks!
I'm having some difficulties with the animation. I want it to rotate when i launch the app (which it does). I also want it to work when I exit and reenter the app but it just stays there when I re enter the app. Here is my code:
Code:
- (void)viewDidAppear:(BOOL)animated{
[self spin];
}
-(void)spin{
[UIView commitAnimations];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationRepeatCount:-1];
[UIView setAnimationDuration:5.0];
spin.transform = CGAffineTransformMakeRotation((M_PI/180)*180);
}
Any help would be greatly appreciated! Thanks!
Last edited by a moderator: