0
只要按住按鈕,我如何重複運行此方法。這樣,只要按住按鈕,圖像就會向上移動。Cocoa Touch - 按住按鈕
-(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];
}
謝謝!