button stays on pressed state when I insert it to a scrollView in widget 2.0
I used this code to move the scrollView when a button is drag.
[lua]
if (event.phase == “moved”) then
local dx = math.abs( event.x - event.xStart ) – Get the x-transition of the touch-input
local dy = math.abs( event.y - event.yStart ) – Get the y-transition of the touch-input
if dx > 5 or dy > 5 then
display.getCurrentStage():setFocus( nil )
event.target.isFocus = false
event.target = i_scroll._view
event.phase = “began”
i_scroll._view.touch( i_scroll._view, event )
end
end
[/lua]
Is there any work around for this?