I have a scrollview widget with one child (myrect)
I want to detect a touch-close event for "myrect", however at the moment it only detects the "initial" phase !!
here is the full code
--main.lua
local widget = require "widget"
local myscrollview = widget.newScrollView{}
local myrect = display.newRect(0, 0, display.contentWidth, 68)
myrect:setFillColor(255,100,100,255)
myscrollview:insert(myrect)
local function ontouch(event)
if event.phase == "ended" then
print("event ended")
end
end
myrect:addEventListener( "touch", ontouch )
I need basic functionality, itβs strange that the crown doesnβt support this, or maybe Iβm missing something
Many thanks
ahmed source
share