How can i repeatedly run this method as long as the button is being held down. This way the image is moved up as long as the button is being held down.
-(IBAction)thrustButton{ //moves ship foward
yCoordinate = yCoordinate - 2;
[UIView beginAnimations:@"slide-up" context:NULL];
shipImageView.center = CGPointMake(xCoordinate,yCoordinate); // change this to somewhere else you want.
[UIView commitAnimations];
}
Thanks!