I've got a button. After you click it, it disappears. I want to make it move a UIImageView continuously down a page with one click.
I've tried a for loop statement but the Image just drops down 200 y coordinates. This is the statement:
for (int i = 1; i <= 200; i++)
{
CGRect oldFrame = _rocketship.frame;
CGRect newFrame = CGRectMake(oldFrame.origin.x, oldFrame.origin.y + 1, oldFrame.size.width, oldFrame.size.height);
_rocketship.frame = newFrame;
}
[self.rocketship startAnimating];
I would think that the Image would continuously go down the page, hence the for statement, but it doesn't. Is there any other way to do this?
(PS: The while loop statement does the same thing)