Why can you explain on an iPhone 6 Plus? I only use Corona Simulator/Xcode simulator to test on that device, and I’ve always assumed that layout would be identical from simulator(s) to device. Now I have doubts!
Well the 6 plus is a special beast. It’s a 1080 x 1920 screen for games, videos and such, but its a bit bigger for Apple UI based apps. Corona SDK returns the values for 1080 x 1920. The Xcode simulator assumes it’s a UI app and returns 1242 x 2208. It reports right on the device because we are an OpenGL full screen app.
But in your case, the problem is a little different. Your phone is running in iPhone 5 compatibility mode. See:
Thanks for your help. I was changing the values of display.contentWidth and display.contentHeight (albeit after I printed the values above to console), and that was messing up the display.
I have now removed the offending lines, and the device is outputting sensible numbers again (very close to simulator, through not quite the same eg. 750 x 1331 on device).
Thanks also for reminding me to add the LaunchScreen.nib to get iPhone6 mode working. I’d done this with another app, just forgot with this app.
For other readers, this involves:
Creating a LaunchScreen.xib in Xcode interface builder
2. Copying the output LaunchScreen.nib into your project root
Copying the png that you used in interface builder to your project root, and
In build.settings, add this to iphone.plist:
UILaunchStoryboardName = “LaunchScreen”
Then you will get ‘optimised for iPhone6 and 6Plus’ in your store listing.
Why can you explain on an iPhone 6 Plus? I only use Corona Simulator/Xcode simulator to test on that device, and I’ve always assumed that layout would be identical from simulator(s) to device. Now I have doubts!
Well the 6 plus is a special beast. It’s a 1080 x 1920 screen for games, videos and such, but its a bit bigger for Apple UI based apps. Corona SDK returns the values for 1080 x 1920. The Xcode simulator assumes it’s a UI app and returns 1242 x 2208. It reports right on the device because we are an OpenGL full screen app.
But in your case, the problem is a little different. Your phone is running in iPhone 5 compatibility mode. See:
Thanks for your help. I was changing the values of display.contentWidth and display.contentHeight (albeit after I printed the values above to console), and that was messing up the display.
I have now removed the offending lines, and the device is outputting sensible numbers again (very close to simulator, through not quite the same eg. 750 x 1331 on device).
Thanks also for reminding me to add the LaunchScreen.nib to get iPhone6 mode working. I’d done this with another app, just forgot with this app.
For other readers, this involves:
Creating a LaunchScreen.xib in Xcode interface builder
2. Copying the output LaunchScreen.nib into your project root
Copying the png that you used in interface builder to your project root, and
In build.settings, add this to iphone.plist:
UILaunchStoryboardName = “LaunchScreen”
Then you will get ‘optimised for iPhone6 and 6Plus’ in your store listing.