@robmiracle Will that show up in the simulator or only on the device? [import]uid: 112953 topic_id: 31881 reply_id: 128987[/import]
device for certain, I’m not sure about the simulator. Please read the blog posts about this. It explains everything better than I can.
[import]uid: 19626 topic_id: 31881 reply_id: 128992[/import]
Go find the blog posts on this.
You have to detect if you are a “tall” device and offer an 640x1136 ratio layout option. (ergo, 320x568)
Here is one I’m using for an app.
[code]
local isTall = ( “iPhone” == system.getInfo( “model” ) ) and ( display.pixelHeight > 960 )
if isTall then
application =
{
content =
{
width = 320,
height = 568,
scale = “letterbox”,
xAlign = “center”,
yAlign = “center”,
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
notification =
{
iphone = {
types = {
“badge”, “sound”, “alert”
}
}
}
}
else
application =
{
content =
{
width = 320,
height = 480,
scale = “letterbox”,
xAlign = “center”,
yAlign = “center”,
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
notification =
{
iphone = {
types = {
“badge”, “sound”, “alert”
}
}
}
}
end
[/code] [import]uid: 19626 topic_id: 31881 reply_id: 128917[/import]
@robmiracle has the correct solution! This has worked for me as well and have had no issues. [import]uid: 71971 topic_id: 31881 reply_id: 128920[/import]
Thanks,
but the Layout for 640x1136 is working fine, I stumbled about the same problem as Naomi, I copied the filename for the tall splash png from the blog post, and this filename will look ok, but won’t work:
As soon as I typed the filename myself it worked fine.
Best,
Andreas
[import]uid: 133261 topic_id: 31881 reply_id: 128925[/import]
@Andreas Thanks! That worked. Changed the name of the splash image and it registered as iPhone 5 in the simulator, without having to change anything in my config.lua file. AWESOME!
-David [import]uid: 112953 topic_id: 31881 reply_id: 128934[/import]
David, if you do not change the config.lua, the app will use all the real-estate visually but the extra area at the top is not active. That is no touch events happen in the top area. If you want to do more than just fill the area with art then you need the config.lua changes as well.
[import]uid: 19626 topic_id: 31881 reply_id: 128950[/import]
@robmiracle Will that show up in the simulator or only on the device? [import]uid: 112953 topic_id: 31881 reply_id: 128987[/import]
device for certain, I’m not sure about the simulator. Please read the blog posts about this. It explains everything better than I can.
[import]uid: 19626 topic_id: 31881 reply_id: 128992[/import]
@robmiracle Hey Rob, I just tested it on the simulator and the device and it looks like it’s working as it should and registering touches throughout the screen, even without the config.lua changes. [import]uid: 112953 topic_id: 31881 reply_id: 129181[/import]
I will share that I just submitted an app that is universal. This is the config.lua that I used:
[lua]application =
{
content =
{
width = 320,
height = 480,
scale = “letterbox”,
audioPlayFrequency = 44100,
imageSuffix =
{
["@2"] = 1.6,
["@4"] = 3.6
},
},
}[/lua]
It has worked correctly in the simulator and on devices that I have tested on.
I added the Default–568h@2x.png file to my project. On the iPhone 5 (which I have tested on actual hardware), the app displays in the “letterboxed” area, but because I had defined the background image to be centered and it is sized larger than the iPhone 5, it correctly fills the screen to prevent the black letterbox bars. Works well for me. [import]uid: 17827 topic_id: 31881 reply_id: 129184[/import]
@robmiracle Hey Rob, I just tested it on the simulator and the device and it looks like it’s working as it should and registering touches throughout the screen, even without the config.lua changes. [import]uid: 112953 topic_id: 31881 reply_id: 129181[/import]
I will share that I just submitted an app that is universal. This is the config.lua that I used:
[lua]application =
{
content =
{
width = 320,
height = 480,
scale = “letterbox”,
audioPlayFrequency = 44100,
imageSuffix =
{
["@2"] = 1.6,
["@4"] = 3.6
},
},
}[/lua]
It has worked correctly in the simulator and on devices that I have tested on.
I added the Default–568h@2x.png file to my project. On the iPhone 5 (which I have tested on actual hardware), the app displays in the “letterboxed” area, but because I had defined the background image to be centered and it is sized larger than the iPhone 5, it correctly fills the screen to prevent the black letterbox bars. Works well for me. [import]uid: 17827 topic_id: 31881 reply_id: 129184[/import]
I don’t understand why this seems to not work the same for everyone.
To start I have build .934, .935 and .941 loaded and used each trying to solve this mystery.
No matter what name I use (dash or em-dash) the new default png will not load. It always loads the Default.png. The file is 640x1136 and is identical to my Default.png except I added extra text so I can verify if it is loading it. I never see it. I see the Default.png.
If I have my width/height set at 640x960 and have the Default-568h@2x.png file (with either spelling) present it will not go full screen. I have to bump my height above 960. I just change it to 962 and boom, full screen on iPhone 5. It does load tall mode on the xcode simulator with just the file present. Though it does not seem to load the correct default png at the beginning of the app on the Corona simulator, Xcode simulator nor the device. Again I only see Default.png.
I honestly find this whole thing to be a frustrating mess. Something that is so simple, yet doesn’t work as described. Add a file the size of 640x1136 with the name of Default-568h@2x.png and it should load in tall mode. How can I be getting this wrong? When Naomi mentioned the whole em-dash thing I thought ahh that must be it. It didn’t seem to change the outcome for me.
I have tried using dash and em-dash in the file name.
I have tried using lowercase h and uppercase H in the file name.
I have tried making the file using Pixelmator on Mac and Photoshop CS6 on Windows.
Any other suggestions from those who have made this work with just the file being present?
Thank you to everyone posting. I look forward to solving this! [import]uid: 56820 topic_id: 31881 reply_id: 129481[/import]
I don’t understand why this seems to not work the same for everyone.
To start I have build .934, .935 and .941 loaded and used each trying to solve this mystery.
No matter what name I use (dash or em-dash) the new default png will not load. It always loads the Default.png. The file is 640x1136 and is identical to my Default.png except I added extra text so I can verify if it is loading it. I never see it. I see the Default.png.
If I have my width/height set at 640x960 and have the Default-568h@2x.png file (with either spelling) present it will not go full screen. I have to bump my height above 960. I just change it to 962 and boom, full screen on iPhone 5. It does load tall mode on the xcode simulator with just the file present. Though it does not seem to load the correct default png at the beginning of the app on the Corona simulator, Xcode simulator nor the device. Again I only see Default.png.
I honestly find this whole thing to be a frustrating mess. Something that is so simple, yet doesn’t work as described. Add a file the size of 640x1136 with the name of Default-568h@2x.png and it should load in tall mode. How can I be getting this wrong? When Naomi mentioned the whole em-dash thing I thought ahh that must be it. It didn’t seem to change the outcome for me.
I have tried using dash and em-dash in the file name.
I have tried using lowercase h and uppercase H in the file name.
I have tried making the file using Pixelmator on Mac and Photoshop CS6 on Windows.
Any other suggestions from those who have made this work with just the file being present?
Thank you to everyone posting. I look forward to solving this! [import]uid: 56820 topic_id: 31881 reply_id: 129481[/import]
@anderoth totally agree with you. It was very frustrating since there isn’t a bunch of documentation on this at the moment and the inner workings of how Corona is switching to tall mode is unclear. I have my resolution set to 767x1023 so it’s already an off configuration that I’m sure not many people are using, and I used it because it seemed like if I had the real iPad resolution of 768x1024, then it didn’t swap into 2x mode correctly. Taking it down 1 pixel seemed to fix it for some strange reason, but I’m not sure if it has anything to do with the iPhone 5 solve. [import]uid: 112953 topic_id: 31881 reply_id: 129526[/import]
@anderoth totally agree with you. It was very frustrating since there isn’t a bunch of documentation on this at the moment and the inner workings of how Corona is switching to tall mode is unclear. I have my resolution set to 767x1023 so it’s already an off configuration that I’m sure not many people are using, and I used it because it seemed like if I had the real iPad resolution of 768x1024, then it didn’t swap into 2x mode correctly. Taking it down 1 pixel seemed to fix it for some strange reason, but I’m not sure if it has anything to do with the iPhone 5 solve. [import]uid: 112953 topic_id: 31881 reply_id: 129526[/import]