在scrollview层添加事件监测
local listener = cc.EventListenerTouchOneByOne:create()
local onTouchEnded = function(touch, event)
target = event:getCurrentTarget()
end
end
listener:registerScriptHandler(onTouchBegin, cc.Handler.EVENT_TOUCH_BEGAN)
listener:registerScriptHandler(onTouchMove, cc.Handler.EVENT_TOUCH_MOVED)
listener:registerScriptHandler(onTouchEnded, cc.Handler.EVENT_TOUCH_ENDED)
scrollview:getEventDispatcher():addEventListenerWithFixedPriority(listener, 0)
target得到的始终是nil,不知道怎么得到scrollview中动态添加的对象