Hi,
i swipe with my finger over the background to in/decrease some data.
On the top from the screen I have a header image (100px height)
Now when I swipe just over the background, all is fine and 'drag ended" is recognized.
But when I swipe over the background and end IN the header Image.
My last event.phase = Moved and thats it.
How could I recognize that the event is ended or canceled while ended outside from the background?
local function startDrag( event )
print (event.phase)
if (event.phase == "began" ) then
-- get initial x,y
elseif (event.phase == "moved" ) then
-- do something
elseif (event.phase == "ended" ) then
updatewert (actualwert)
-this should always be called when dragging is ended
- either by lifting the finger or going outside of the area (in that case background)
end
end
background:addEventListener( "touch", startDrag )
thx
chris