iphone beginner question

Nibbie
Posts: 1
Joined: 2009.06
Post: #1
I decided to take my summer out of school to learn how to program iphone apps.
It is going surprisingly well but there are a couple of things i just cannot figure out. I have a book, "Beginning Iphone Development" which is really helpful, but it doesn't contain all the info i need.

The biggest problem right now is that i cannot figure out how to, in a game, make the button provide continuous motion. For example, the user touches "Move Left" and the object on the screen should continuously move left as long as the user holds down "Move Left." How can i do this?
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #2
override the touch events and start moving on touchesBegan and stop moving on touchesEnd

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Member
Posts: 306
Joined: 2009.03
Post: #3
Its a little more complicated then that. You also have to decide how you will handle somebody sliding their finger off the button without lifting their finger. When they slide it back on you should prob beging moving again. What I look for is either a touch starting on a button, or continuing on a button that is not currently active.
Quote this message in a reply
Post Reply