I was trying to make an onscreen character move with four arrows: up, right, left and down, like a Game Boy.
I did this:
- (IBAction) moveDown
{
Image.center = CGRectPointMake ( Image.center.x , Image.center.y + 1);
}
But the character only moved once per touch, and this is not what I want.
So I tried making a timer:
-(IBAction) timerSet {
// Timer = [ecc..] selecting (moveDown) every 0.1 seconds repeat:YES.
This time the character started to move, but he doesn't stop.
How can I make the character move only while the button is being pressed?