Ok so I had an animation that was working great on an infinite loop.
Code:
- (void)cloudAnimation
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationRepeatCount:1e100f];
[UIView setAnimationDuration:30.0];
[UIView setAnimationDelegate:self];
[UIView setAnimationRepeatAutoreverses:YES];
cloudView.center = CGPointMake (20, 300);
[UIView commitAnimations];
}
It was called in my "initWithFram" like this
Code:
[self cloudAnimation];
Well this was working perfect while the view that was my main (and only) view was what loaded first but I switched to have multiple views and this view is no longer the first view loaded by my LevelViewControler.
I Flip into the view with the animation like this:
Code:
UIImage *startButtonImage = [UIImage imageNamed:@"startButtonA.png"];
CGRect buttonFrame = CGRectMake(startShiftRightA, startShiftDownA, startButtonImage.size.width, startButtonImage.size.height);
startButton = [self buttonWithTitle:nil target:self.viewControllerB selector:@selector(flipGame:) frame:buttonFrame image:startButtonImage];
Well the animation does not run anymore..
But I tried to attach that animation to another of my UIviews and it instantly moved that UIview to where the end of the animation would be without actually animating (it would load in with the view already at the ending point of the animation)
What's up with this? this animation is on an infinite loop.. it should just run once called.
I'm confused as to why it's broken now when it was working before.
as a note: the rest of my animations are still working..
I know it's because I added more views and this got screwy.. I think my view is not getting initialized correctly.
HELP!