iPHone 5 Scaling

I am trying to get my iPhone app to automatically scale to the iPhone’s 5 resolution, I have gotten this to work by editing my config.lua file: (see below) However when Corona scales the image, it uses the original 320 x 480 image not my retina images (960 x 640) How can I change the config file so that the dynamic scaling uses my “@2x” for scaling instead of just the base lowest resolution image?
[lua]–config.lua

if display.pixelHeight > 960 then

application =
{

content =
{

width = 320,
height = 480,

imageSuffix =
{
["@2x"] = 2,
},

},

}
else

application =
{

content =
{

width = 320,
height = 480,
scale = “letterbox”,

imageSuffix =
{
["@2x"] = 2,
},

},

}

end
[import]uid: 170397 topic_id: 30998 reply_id: 330998[/import]

Do this and it’ll work perfectly. This will support the regular iOS size, iPhone retina, and the iPad retina (as well as pretty much every Android device). For your “background” images in the app, use something around 570x380 so that your background will always fill the entire screen (really useful for all the different Android devices).

[code] application =
{
content =
{
width = 320,
height = 480,
scale = “letterbox”,
fps = 60,

imageSuffix =
{
["@2x"] = 2.0,
["@4x"] = 4.0,
},

},
}

[/code] [import]uid: 51654 topic_id: 30998 reply_id: 123944[/import]

Try making your height 568 on the if part of your config (isTall) and see if that helps. [import]uid: 19626 topic_id: 30998 reply_id: 123949[/import]

I fixed the problem!! What i did was change the height in the config.lua file to 568. That sorted out most of the scalling, however a couple of things were out of place. (e.g. my titles and the background) So what i did was create a global variable in my main.lua file

if ( display.pixelHeight \> 961 ) then   
  
\_G.isTall = true  
  
end  
  

Then i just created some if statements so that the app would use my iphone 5 backgrounds. Worked like a charm. Now my app support both the iPhone 4S and the iPhone 5.

Also it only took me about 3 hours to convert the app, however my app is only about 4000 lines of code.

Thanks for helping me.
[import]uid: 170397 topic_id: 30998 reply_id: 123984[/import]

Do this and it’ll work perfectly. This will support the regular iOS size, iPhone retina, and the iPad retina (as well as pretty much every Android device). For your “background” images in the app, use something around 570x380 so that your background will always fill the entire screen (really useful for all the different Android devices).

[code] application =
{
content =
{
width = 320,
height = 480,
scale = “letterbox”,
fps = 60,

imageSuffix =
{
["@2x"] = 2.0,
["@4x"] = 4.0,
},

},
}

[/code] [import]uid: 51654 topic_id: 30998 reply_id: 123944[/import]

Try making your height 568 on the if part of your config (isTall) and see if that helps. [import]uid: 19626 topic_id: 30998 reply_id: 123949[/import]

I fixed the problem!! What i did was change the height in the config.lua file to 568. That sorted out most of the scalling, however a couple of things were out of place. (e.g. my titles and the background) So what i did was create a global variable in my main.lua file

if ( display.pixelHeight \> 961 ) then   
  
\_G.isTall = true  
  
end  
  

Then i just created some if statements so that the app would use my iphone 5 backgrounds. Worked like a charm. Now my app support both the iPhone 4S and the iPhone 5.

Also it only took me about 3 hours to convert the app, however my app is only about 4000 lines of code.

Thanks for helping me.
[import]uid: 170397 topic_id: 30998 reply_id: 123984[/import]