ok i have an ibaction looks like this:
so its part of the code to make the image go up out of the screen. then in the SAME IBAction, how can i make the image come back down again? I have tried copying parts of the code and altering them but errors come up
so bottom line:
How to animate an image up and back down again in ONE animation?
Code:
-(IBAction)animatego {
NSTimer *animateTime = [NSTimer scheduledTimerWithTimeInterval:0.0 target:self selector:@selector(animate) userInfo:nil repeats:YES];
}
-(void)animate {
if (animated == FALSE) {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:2.0];
dmImage.transform = CGAffineTransformMakeTranslation(0, -600);
dmImage.alpha = 1.0;
[UIView commitAnimations];
animated = TRUE;
} else {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.5];
dmImage.alpha = 1.0;
[UIView commitAnimations];
animated = FALSE;
}
so its part of the code to make the image go up out of the screen. then in the SAME IBAction, how can i make the image come back down again? I have tried copying parts of the code and altering them but errors come up
so bottom line:
How to animate an image up and back down again in ONE animation?