Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ethayne

macrumors newbie
Original poster
Dec 31, 2008
3
0
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:

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!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.