I’ve made an Scrollview to view my Image in a Scene but it adds a blank white space after the image finishes in bottom
donr know what is the problem cause my image size and scrollWidth and Height are the same amount
local composer = require( "composer" ) local scene = composer.newScene() local back; local fallen; function scene:create( event ) local sceneGroup = self.view -- Code here runs when the scene is first created but has not yet appeared on screen local background = display.newRect(0,0,\_W,\_H); background:setFillColor(0,0,0); fallen = display.newImageRect("images/whatyou.png",\_W,\_W\*8); fallen.x = \_W\*0.5; fallen.y = \_W\*4; local widget = require( "widget" ) local scrollView = widget.newScrollView({ width = \_W, height = \_H, scrollWidth = \_W; scrollHeight = \_W\*8; horizontalScrollDisabled = true, verticalScrollDisabled = false, isBounceEnabled = false }) sceneGroup:insert(background); sceneGroup:insert(fallen); scrollView:insert(fallen); local function onKeyEvent( event ) -- If the "back" key was pressed on Android or Windows Phone, prevent it from backing out of the app if ( event.keyName == "back" ) then local platformName = system.getInfo( "platformName" ) if ( platformName == "Android" ) or ( platformName == "WinPhone" ) then composer.gotoScene("a-evanescence", { effect = "slideLeft", time = 250 }); return true end end -- IMPORTANT! Return false to indicate that this app is NOT overriding the received key -- This lets the operating system execute its default handling of the key return false end -- Add the key event listener Runtime:addEventListener( "key", onKeyEvent ) end -- show() function scene:show( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then -- Code here runs when the scene is still off screen (but is about to come on screen) elseif ( phase == "did" ) then -- Code here runs when the scene is entirely on screen end end -- hide() function scene:hide( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then -- Code here runs when the scene is on screen (but is about to go off screen) elseif ( phase == "did" ) then -- Code here runs immediately after the scene goes entirely off screen end end -- destroy() function scene:destroy( event ) local sceneGroup = self.view -- Code here runs prior to the removal of scene's view composer.removeScene("m-breath"); end -- ----------------------------------------------------------------------------------- -- Scene event function listeners -- ----------------------------------------------------------------------------------- scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene ) -- ----------------------------------------------------------------------------------- return scene