Hi all,
I'm fairly new to iPhone programming, and I'm working on an app that triggers an event if the user holds their finger to the screen. I couldn't find any sample code that had this in it, so I'm really just guessing. Anyway, this is what I have:
Is this the right syntax? Or am I missing something completely?
I also need to understand how to trigger another event when the touch is released. Anyway, thanks for the help!
I'm fairly new to iPhone programming, and I'm working on an app that triggers an event if the user holds their finger to the screen. I couldn't find any sample code that had this in it, so I'm really just guessing. Anyway, this is what I have:
Code:
UITouch *touch = [touches anyObject];
if (touch.phase == UITouchPhaseStationary)
*trigger event*
Is this the right syntax? Or am I missing something completely?
I also need to understand how to trigger another event when the touch is released. Anyway, thanks for the help!