Hi Rob:
I also can confirm that this is happening for me, and I whipped up a simple sample app that illustrates the problem (it works fine in the simulator, but not if you build and run on an iOS device). I also filed a bug report. That bug report’s case # is 39317.
Hopefully this can get corrected in a daily build ASAP. I’m assuming that it’s a relatively easy fix - it would appear that the Runtime object is just not dispatching “resize” events on iOS devices.
Thanks,
Jason
PS: below is the code to my sample main.lua (but to really see it you should download the attached ZIP file, as it contains config.lua & build.settings that you’ll need to build for device so you can witness the bug on-device)
-- RESIZE BUG (TESTED IN CORONA SDK 2015.2570 display.setStatusBar( display.HiddenStatusBar ) ------------------------------------------------------------------------------------ -- DELARE GLOBAL SCREEN POSITION VARIABLES ------------------------------------------------------------------------------------ centerX = display.contentCenterX centerY = display.contentCenterY screenTop = math.floor(display.screenOriginY) screenLeft = math.floor(display.screenOriginX) screenBottom = display.contentHeight - screenTop screenRight = display.contentWidth - screenLeft screenWidth = screenRight - screenLeft screenHeight = screenBottom - screenTop ------------------------------------------------------------------------------------ -- PLACE RECTS IN CORNERS ------------------------------------------------------------------------------------ local topLeft = display.newRect(screenLeft, screenTop, 40, 40) topLeft:setFillColor(1, 0, 0) topLeft.anchorX, topLeft.anchorY = 0, 0 local topRight = display.newRect(screenRight, screenTop, 40, 40) topRight:setFillColor(0, 1, 0) topRight.anchorX, topRight.anchorY = 1, 0 local bottomLeft = display.newRect(screenLeft, screenBottom, 40, 40) bottomLeft:setFillColor(0, 0, 1) bottomLeft.anchorX, bottomLeft.anchorY = 0, 1 local bottomRight = display.newRect(screenRight, screenBottom, 40, 40) bottomRight:setFillColor(1) bottomRight.anchorX, bottomRight.anchorY = 1, 1 ------------------------------------------------------------------------------------ -- REPOSITION OBJECTS ON RESIZE (works in Simulator, not on iOS Device) ------------------------------------------------------------------------------------ function onResize( event ) print("RESIZE EVENT FIRED!") -- this won't print out to device terminal (event not fired) centerX = display.contentCenterX centerY = display.contentCenterY screenTop = math.floor(display.screenOriginY) screenLeft = math.floor(display.screenOriginX) screenBottom = display.contentHeight - screenTop screenRight = display.contentWidth - screenLeft screenWidth = screenRight - screenLeft screenHeight = screenBottom - screenTop topLeft.x, topLeft.y = screenLeft, screenTop topRight.x, topRight.y = screenRight, screenTop bottomLeft.x, bottomLeft.y = screenLeft, screenBottom bottomRight.x, bottomRight.y = screenRight, screenBottom end Runtime:addEventListener( "resize", onResize )