ストーリーボードでスクロールビューを機能させようとしていたので、今はとても行き詰まっています。スクロール ビューを使用してコロナのファイル/サンプル アプリをいじっていましたが、ストーリーボードに従っていないため、スクロール ビューが機能します。ストーリーボードの実装に値するゲームに移動すると、画像をクレート画面に配置しましたが、スクロールビューを挿入しようとすると機能しません。誰かがこのファイルをストーリー ボード形式にしてくれませんか? ここにファイルがあります
display.setStatusBar( display.HiddenStatusBar )
local bg = display.newImage ("bg.png")
local widget = require( "widget" )
-- Our ScrollView listener
local function scrollListener( event )
local phase = event.phase
local direction = event.direction
if "began" == phase then
--print( "Began" )
elseif "moved" == phase then
--print( "Moved" )
elseif "ended" == phase then
--print( "Ended" )
end
-- If the scrollView has reached it's scroll limit
if event.limitReached then
if "up" == direction then
print( "Reached Top Limit" )
elseif "down" == direction then
print( "Reached Bottom Limit" )
elseif "left" == direction then
print( "Reached Left Limit" )
elseif "right" == direction then
print( "Reached Right Limit" )
end
end
return true
end
-- Create a ScrollView
local scrollView = widget.newScrollView
{
left = 0,
top = 0,
width = display.contentWidth,
height = display.contentHeight,
bottomPadding = 50,
id = "onBottom",
horizontalScrollDisabled = true ,
verticalScrollDisabled = false ,
hideBackground = true,
listener = scrollListener,
}
local worlds = display.newImage ("pink.png")
worlds.x = 100
worlds.y = 100
scrollView:insert( worlds)
local worlds1 = display.newImage ("pink.png")
worlds1.x = 100
worlds1.y = 800
scrollView:insert( worlds1)
local worlds2 = display.newImage ("pink.png")
worlds2.x = 100
worlds2.y = 500
scrollView:insert( worlds2)
local worlds3 = display.newImage ("pink.png")
worlds3.x = 100
worlds3.y = 1000
scrollView:insert( worlds3)
local worlds4 = display.newImage ("pink.png")
worlds4.x = 100
worlds4.y = 2000
scrollView:insert( worlds4)
私はコロナSDKの初心者です。私がストーリー ボードに入れたファイルが必要な場合は、誰かが私の質問に答えていただければ幸いです。コメントを残して編集しますが、機能しないため理由がわかりません。このファイルをストーリーボード形式にしたいだけです。