UITouchPhaseStationary Help

Discussion in 'iOS Programming' started by ethayne, Dec 31, 2008.

  1. macrumors newbie

    Dec 31, 2008
    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:

    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!

Share This Page