tags:

views:

132

answers:

3

Greetings,

I'm trying to get a ui button to have dual identities. If the user pushes it normally, an event fires (this works already). If the user pushes and holds it for some time period (2 seconds for example) a different event fires.

Any suggestions on a way to handle the "hold it down for 2 seconds" event?

Thanks!

A: 

I believe that your answer lies within this question

KevinDTimm
A: 

That looks good too.....

But I took another approach (should have delayed my question)....

I simply set the current date/time on then push event, and check for the time difference on the release inside event. If longer then xx seconds do the alternate function.

Works like a charm. Sorry for the premature-e-post-ulation...

Dan Ribar
A: 

Hi, Can somebody please put some sample code here? For a few days now i've been wrestling with this exact problem. Can someone help?

Steake