Background crops on iPhone

Hi!

When I test the app in Corona simulator, everything works fine. But when I test on device (iPhone 5c) or in xCode simulator, the background is cropped.

Here is the same project in Corona simulator and iOS simulator

[sharedmedia=core:attachments:1009]

Here is the config-file:

application = { content = { width = 640, height = 960, scale = "letterBox", fps = 30, audioPlayFrequency = 22050,

And the background attachment code:

        local bg = display.newImageRect("images/start\_tausta.png",1140,720)         group:insert(bg)         bg.y = data.H/2         bg.x = data.W/2

Corona is  2013.1260.

Thanks in advance!

You need to include a splash screen image called “Default-568h@2x.png” in your project in order to “switch on” the larger screen size for iOS phones. Otherwise it assumes it’s a 640 * 960 screen. 

The image size should be 640w * 1136h

I have no idea why this is the case though…

Thanks Alan! That was the case indeed. I had a feeling that the answer ain’t going to be a logical one :wink:

You need to include a splash screen image called “Default-568h@2x.png” in your project in order to “switch on” the larger screen size for iOS phones. Otherwise it assumes it’s a 640 * 960 screen. 

The image size should be 640w * 1136h

I have no idea why this is the case though…

Thanks Alan! That was the case indeed. I had a feeling that the answer ain’t going to be a logical one :wink: