local pageView = panel_main:getChildByName("PageView_1")
local function pageViewEvent(sender, eventType)
if eventType == ccui.PageViewEventType.turning then
local pageView = sender
local pageInfo = string.format("page %d " , pageView:getCurPageIndex() + 1)
print(pageInfo)
end
end
pageView:addEventListener(pageViewEvent)
【cocos2d-x 3.5】Lua 加载cocostudio的PageView
最新推荐文章于 2023-03-02 19:40:45 发布