I originally posted this in the newbie forums but realized it should be here.
I have a business app released, and I just did an update for it’s UI a couple of months ago. The Main menu consists of a tableView that goes off screen. In each row is a small icon display object and a newText, and when tapping on the row it takes you to the corresponding function scene.
I have a function that, when you first get to the menu scene, it moves the list a bit to show that it’s scrollable. And each row fades in and out based on if it’s visible on screen.
My problem, is that I have gotten 2 people (out of a couple hundred) saying that the tableView (menu) just doesn’t show up when they open the app. All they see is the white background and the logo and the facebook icon. One is using an iPhone 4 and one is using an iPhone 3 (OS 6.1.3). I have tested the app on both my iPhone 5 and my iPhone 4 and it works fine, and i’ve had no other customer complaints. Testing with debugging shows nothing either.
I’m not even sure how to troubleshoot this. So I was hoping by posting here someone might know of an issue with the tableView (I’m guessing its a problem with the tableView) and older iOS versions?
Screenshot of menu:
Code:
local function moveItems() menuList:scrollToIndex( 3, 1300, scrollComplete ) end scrollComplete = function() menuList:scrollToIndex( 1, 500 ) end local function onRowTouch( event ) local phase = event.phase local row = event.target.index if "press" == phase then elseif "release" == phase then going.num = row print(row) sceneSelect() end end local function onRowRender( event ) -- Get reference to the row group local row = event.row local buttons = event.row.params.buttons local labels = event.row.params.labels local icon, label -- Cache the row "contentWidth" and "contentHeight" because the row bounds can change as children objects are added local rowHeight = row.contentHeight local rowWidth = row.contentWidth icon = display.newImageRect(row, buttons[row.index], 56, 56) icon.anchorX = 0 icon.x = 0 icon.y = rowHeight \* 0.5 icon.alpha = 0 transition.to(icon, {alpha = 0.75, time = 500}) label = display.newText( { parent = row, text = labels[row.index], 0, 0, font = "BerlinSansFB-Reg", fontSize = 20, width = 100}) label.anchorX = 0 label.x = icon.x + icon.contentWidth + 10 label.y = rowHeight \* 0.5 label:setFillColor(0.15, 0.4, 0.729, 0.90) label.alpha = 0 transition.to(label, {alpha = 1, time = 500}) return true end function scene:create( event ) local sceneGroup = self.view myData.inch = false timesOpen2 = loadsave.loadTable("timesOpen2.json") if timesOpen2.opened == 5 then native.showAlert ( "Find this App useful?", "Leave a review and help others find it!", { "Never", "Later", "OK" }, alertListener ) end print("Times Opened "..timesOpen2.opened) going = {} going.num = 1 back = display.newRect( sceneGroup, display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) backEdgeX = back.contentBounds.xMin backEdgeY = back.contentBounds.yMin Runtime:addEventListener( "key", onKeyEvent ) logo = display.newImageRect(sceneGroup, "Images/title.png", 175, 100) logo.x = backEdgeX + 10 logo.anchorX = 0 logo.anchorY = 0.5 logo.y = logo.contentHeight / 2 + 40 topBar = display.newRect( sceneGroup, 0, 0, display.contentWidth, 30 ) topBar:setFillColor(0.15, 0.4, 0.729, 0.75) topBar.anchorX = 0 topBar.anchorY = 0 facebookButt = display.newImageRect(sceneGroup, "Images/facebook.png", 42, 42) facebookButt.anchorX = 0 facebookButt.anchorY = 0.5 facebookButt.x = logo.x facebookButt.y = logo.y \* 2 facebookButt:addEventListener ( "touch", goingFacebook ) butTable = {} labelTable = {} butTable[1] = "Images/rightMenu.png" butTable[2] = "Images/obliqueMenu.png" butTable[3] = "Images/sineMenu.png" butTable[4] = "Images/boltMenu.png" butTable[5] = "Images/speedMenu.png" butTable[6] = "Images/counterButt.png" butTable[7] = "Images/chartMenu.png" butTable[8] = "Images/mattButt.png" labelTable[1] = "Right Angle" labelTable[2] = "Oblique Triangle" labelTable[3] = "Sine Bar" labelTable[4] = "Bolt Circle" labelTable[5] = "Speeds & Feeds" labelTable[6] = "C'Sink & Drill Point" labelTable[7] = "Drill Charts" labelTable[8] = "Materials List" menuList = widget.newTableView{ left = logo.x + logo.contentWidth + 10, top = topBar.contentHeight, width = display.contentWidth - (logo.x + logo.contentWidth + 10) - 10, height = display.contentHeight - topBar.contentHeight, onRowTouch = onRowTouch, onRowRender = onRowRender, hideScrollBar = false, noLines = true, } sceneGroup:insert(menuList) for i = 1, #butTable, 1 do local isCategory = false local rowHeight = 65 local rowColor = { default={ 1, 1, 1 }, over={ 0.15, 0.4, 0.729, 0.2 } } local lineColor = { 0.15, 0.4, 0.729 } menuList:insertRow( { isCategory = isCategory, rowHeight = rowHeight, rowColor = rowColor, lineColor = lineColor, params = { buttons = butTable, labels = labelTable } } ) end if not composer.getSceneName( "previous" ) then timer.performWithDelay(500, moveItems) end end