A bit of a problem for a scrollView to not scroll. Please tell me what I’m doing wrong.
local ScrollView = require("coronaui\_scrollView")
local topBoundary = 60 --I've tried many different values for this
local bottomBoundary = 160 --I've tried many different values for this
local scrollView = ScrollView.new{ top=topBoundary, bottom=bottomBoundary }
scrollView.x = 60
scrollView.y = 60
local myGroup = display.newGroup()
local yPos = 0
local spacing = 140
for i = 1,3 do
local rect = display.newRect( 0, yPos, 100, 100 )
rect:setFillColor(255, 0, 0)
yPos = yPos + spacing
scrollView:insert(rect)
end
local scrollBackground = display.newRect(0, 0, 250, scrollView.height+64)
scrollBackground:setFillColor(255, 255, 255)
scrollView:insert(1, scrollBackground)
myGroup:insert(scrollView)
[import]uid: 52127 topic_id: 10426 reply_id: 310426[/import]