我在 corona sdk 中创建了一个 ScrollView ,但我遇到了一些问题,我只需要它来水平滚动。有帮助吗?
local widget = require("widget")
local rect1 = display.newRect(20,100,150,100)
local rect2 = display.newRect(200,100,150,100)
local rect3 = display.newRect(380,100,150,100)
local rect4 = display.newRect(580,100,150,100)
local rect5 = display.newRect(780,100,150,100)
local scrollView = widget.newScrollView{ left = 0, width = 0, height = 200, }
scrollView:insert(rect1);
scrollView:insert(rect2);
scrollView:insert(rect3);
scrollView:insert(rect4);
scrollView:insert(rect5);
最佳答案
根据 Corona SDK API ,您可以执行以下操作:
scrollView.verticalScrollDisabled = true
关于lua - Corona SDK 中的水平 ScrollView ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19825066/