I’m trying to find a neat way to create and event when a user presses and holds for a couple of seconds on a UI object, which is different from just tapping.
I was thinking of creating an on touch event and creating a timer on the “began” phase and cancel the timer on the “ended” and “cancelled” events. The timer increments a counter value. For each call by that object to the handler which is not “began”, “cancelled”, or “ended” (not sure what to do with the “move” event) I check if the counter is greater than say 2 (meaning 2 seconds) and perform the action and cancel the timer.
Is this a good strategy or are there simpler way?
Thanks [import]uid: 74162 topic_id: 21569 reply_id: 321569[/import]