Tableview row touch and hold

Default behaviour on iOS is that when you tap and hold a row without scrolling it up or down, then release the touch, the row counts as selected. 

I’m using phase == “tap” and then I go to a scene. But then the touch and hold scenario fails, and even if you are a rather lazy tapper it will fail as well as it stops counting as a tap.

How are people getting around this, if at all? 

I’m using todays build (1149)

I use a modified version of this:

http://stackoverflow.com/questions/16473220/touch-hold-event-in-corona-sdk

Thanks for the link. I will do something similar.

I think the tap listener is not practical for tableview when checking if the row was selected. Maybe a phase called “selected” or something would be a good idea…

There’s a little mentioned mechanism called “focus” which exists.

        display.getCurrentStage():setFocus( event.target )
        event.target.isFocus = true

How it works is a little unpredictable. That object (in focus) is told it’s isFocus for it’s own use, but the stage (visible scene) can be told what to focus. How do you get what’s currently in focus? I never could figure it out, other than checking “isFocus”

 

I use a modified version of this:

http://stackoverflow.com/questions/16473220/touch-hold-event-in-corona-sdk

Thanks for the link. I will do something similar.

I think the tap listener is not practical for tableview when checking if the row was selected. Maybe a phase called “selected” or something would be a good idea…

There’s a little mentioned mechanism called “focus” which exists.

        display.getCurrentStage():setFocus( event.target )
        event.target.isFocus = true

How it works is a little unpredictable. That object (in focus) is told it’s isFocus for it’s own use, but the stage (visible scene) can be told what to focus. How do you get what’s currently in focus? I never could figure it out, other than checking “isFocus”