views:

15

answers:

1

Hello,

There's probably something really obvious I'm missing, but no matter how I trawl the documentation & the blogs, I can't find a way to make a button report whether or not it is being touched, regardless of whether the touch moves, etc. I have an up & down button, & I need to call the relevant method whenever there is a finger on it.

Many thanks,

Franklyn Weber

A: 

Add an action to the touch down event and you are being touched up until any of the touch up events are fired. If you need to be continuously called, use an NSTimer. Start the timer on touch down and then check to see if you are still down in the timer handler. If you are, do your thing and set another timer.

Lou Franco