Corona on left, Xcode simulator on right.
Text looks good in Corona simulator, then looks un-optimized for iPhone 5 on Xcode or device.
Corona on left, Xcode simulator on right.
Text looks good in Corona simulator, then looks un-optimized for iPhone 5 on Xcode or device.
Hi Niles,
Thanks for the info. Can you please test this using just one line of text? In other words, don’t specify a width and height parameter in the newText() call. I’d like to see if this is a factor of a multi-line text box, or something else.
[lua]
local text1 = display.newText( “testingTESTING”, 66, 60, “Arial”, 60 )
[/lua]
Best regards,
Brent
For iPhone 5
2013-04-28 20:54:44.635 Corona Simulator[45723:707] 2 2.3666666690177
2013-04-28 20:54:44.635 Corona Simulator[45723:707] 2 2.3666666690177
No longer optimized for iPhone 5 in Corona Simulator. Attaching pic.
In the first .tiff you posted, it looks like the iPhone 5 is not recognizing the Default-568h@2x.png file. If you copied the name from our blog post, then the dash was being converted to a fancy n-dash and that won’t work.
If you have other Default.png files, why not drop some graphics on the Default-568h@2x.png file to make sure you see that file show when your app boots up on your iPhone 5.
Took the dash out and typed it back in.
No change.
Hi Niles,
Can you post your basic code (for the scene) here? Just the part where you display the green text, and maybe one of the white “button” boxes below. I don’t need to see the entire project code.
Also, can you attach your full config.lua to this post?
Thanks,
Brent
Config.lua
launchPad = false
application = {
content = {
width = 320,
height = 480,
scale = “zoomStretch”,
fps = 30,
}
}
Code for scene:
title = display.newText( “You awaken in a desert. It is morning, and although you are still cold from the night, you know that it will soon reach inhospitable temperatures. All around you is endless desert expanse, except to the east, where there appears to be a town.”, 0, 0, 320, 500, native.systemFont, ts )
title:setTextColor( r, g, b )
local northbutton = display.newRect(0, 0, 76, 30, 4)
northbutton.strokeWidth = 2
northbutton:setFillColor(0)
northbutton.x = display.contentWidth / 2
northbutton.y = display.contentHeight - 160
Hi Niles,
OK, I’m doing a bit of testing with this. But may I ask, when you mean “unoptimized”, do you mean that the text on the phone isn’t going “flush” to the (taller) top of the iPhone5? Or is there something else that I’m just not seeing in the screenshots?
Would you be open to using a different scale method than “zoomStretch” if I provided an alternative? That’s generally not a scale mode that I recommend to anybody, even a text-based app.
By the way, the “launchPad” setting in the config should go within the application table, not outside it. Just an FYI.
Brent
Yes, it isn’t going flush to the taller iPhone 5 screen. Ironically, it does in the Corona Simulator.
Yes, i’m open to anything the works.
This is 99% likely to be a problem with your Default-568h@2x.png file. Can you email it to me at:
rob AT coronalabs DOT com (putting an @ and . in the right places) and let me take a look at your image and see if there is something amiss?
Sent
You are not going to believe this one… The file name needs to be:
Default-568h@2x.png
not:
Default-568h@2x. PNG
Just rename the extension to lower case .png and your problem should be fixed.
That was it!
So weird!
Filenames on devices are case sensitive, not so on the Mac
Hi Niles,
Any luck to fix the problem? I have exactly the same problem. Was there anything wrong with your Default-568h@2x.png? Could you please update us?
Cheers,
Arash
Hi Arash. Niles had an upper case .PNG as part of his file name. The filename has to be an exact case match. It also has to be 640px wide and 1136px high.
I chekced Default-568h@2x.png, the filename is right and it has the right dimensions. I’m not sure if my config file is right. Could you please have look? I also attached my Default-568h@2x.png.
Cheers,
Config.lua
application =
{
content =
{
width = 320,
height = 480,
scale = “zoomStretch”
},
}
Hi Arash,
I assume this file is in the root project directory, not in a subfolder? And the “dash” in the file name is an actual dash (hyphen), not some kind of HTML m-dash or n-dash (extended dash)?
Visually, on the actual iPhone5, what does it look like? Are you getting the empty bars on both top and bottom, or something else?
As a side note, unless this solely a text-based app, I don’t recommend using “zoomStretch”, as that will likely warp your images. “letterbox” or “zoomEven” are much better choices in general.
Brent
Hi Brent,
The dash is an actuall dash and the file is in the root project directory as the main.lua file is.
There are empty bars on the left and right of the screen, as my game runs in landscape.
Cheers,
Arash