hideBackground in scrollView not working for iOS7, just a white background and the test is not visible. Please correct.
I have a scrollView with hideBackground, and it’s working fine for me on iOS 7. Can you post your code?
- Andrew
Submit a bug report if you haven’t already done so
code:
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 = 300, bottomPadding = 50, id = "onBottom", horizontalScrollDisabled = true, verticalScrollDisabled = false, listener = scrollListener, hideBackground = true, } local lotsOfText = "texttexttexttexttext" --Create a text object containing the large text string and insert it into the scrollView local lotsOfTextObject = display.newText( lotsOfText, 0, 0, 400, 0, "Times New Roman", 14) lotsOfTextObject:setTextColor( 255, 255, 255 ) lotsOfTextObject:setReferencePoint( display.TopCenterReferencePoint ) lotsOfTextObject.x = display.contentCenterX lotsOfTextObject.y = 48 scrollView:insert( lotsOfTextObject )
I just copy/pasted your code and ran it on iOS 7 without any issues. The white text was visible, and the scrollView background was hidden (i.e., black background). I tried building against both the iOS 6.1 seed and iOS 7.0 seed, and both were fine. I’m using daily build 1206.
- Andrew
Yes but when you use works director modul does not work
module(..., package.seeall) function new() local localGroup = display.newGroup() 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 = 300, bottomPadding = 50, id = "onBottom", horizontalScrollDisabled = true, verticalScrollDisabled = false, listener = scrollListener, hideBackground = true, } local lotsOfText = "texttexttexttexttext" --Create a text object containing the large text string and insert it into the scrollView local lotsOfTextObject = display.newText( lotsOfText, 0, 0, 400, 0, "Times New Roman", 14) lotsOfTextObject:setTextColor( 255, 255, 255 ) lotsOfTextObject:setReferencePoint( display.TopCenterReferencePoint ) lotsOfTextObject.x = display.contentCenterX lotsOfTextObject.y = 48 scrollView:insert( lotsOfTextObject ) return localGroup end
In that case, you’ll probably need to contact the creator of Director, since it’s not a module that Corona supports.
- Andrew
I figured out, it’s not because of this. Bug is obtained from a very long text. In the console on the device shows:
<Warning>: WARNING: The text object containing the following text will not render correctly because the height (4100) exceeds max texture dimensions (4096)
On iOS6 works, and on iOS7 appears this error and instead of text white background.
I have a scrollView with hideBackground, and it’s working fine for me on iOS 7. Can you post your code?
- Andrew
Submit a bug report if you haven’t already done so
code:
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 = 300, bottomPadding = 50, id = "onBottom", horizontalScrollDisabled = true, verticalScrollDisabled = false, listener = scrollListener, hideBackground = true, } local lotsOfText = "texttexttexttexttext" --Create a text object containing the large text string and insert it into the scrollView local lotsOfTextObject = display.newText( lotsOfText, 0, 0, 400, 0, "Times New Roman", 14) lotsOfTextObject:setTextColor( 255, 255, 255 ) lotsOfTextObject:setReferencePoint( display.TopCenterReferencePoint ) lotsOfTextObject.x = display.contentCenterX lotsOfTextObject.y = 48 scrollView:insert( lotsOfTextObject )
I just copy/pasted your code and ran it on iOS 7 without any issues. The white text was visible, and the scrollView background was hidden (i.e., black background). I tried building against both the iOS 6.1 seed and iOS 7.0 seed, and both were fine. I’m using daily build 1206.
- Andrew
Yes but when you use works director modul does not work
module(..., package.seeall) function new() local localGroup = display.newGroup() 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 = 300, bottomPadding = 50, id = "onBottom", horizontalScrollDisabled = true, verticalScrollDisabled = false, listener = scrollListener, hideBackground = true, } local lotsOfText = "texttexttexttexttext" --Create a text object containing the large text string and insert it into the scrollView local lotsOfTextObject = display.newText( lotsOfText, 0, 0, 400, 0, "Times New Roman", 14) lotsOfTextObject:setTextColor( 255, 255, 255 ) lotsOfTextObject:setReferencePoint( display.TopCenterReferencePoint ) lotsOfTextObject.x = display.contentCenterX lotsOfTextObject.y = 48 scrollView:insert( lotsOfTextObject ) return localGroup end
In that case, you’ll probably need to contact the creator of Director, since it’s not a module that Corona supports.
- Andrew
I figured out, it’s not because of this. Bug is obtained from a very long text. In the console on the device shows:
<Warning>: WARNING: The text object containing the following text will not render correctly because the height (4100) exceeds max texture dimensions (4096)
On iOS6 works, and on iOS7 appears this error and instead of text white background.