Image Not Filling Up Top and Bottom of iPhone

I read the ‘Modernizing the config.lua’ article. I have an iPhone 5 so I believe the screen resolution is 640x1136 pixels. So I loaded the image like this because on a 800x1200 content area, I need a background of 900x1425:

backGround=display.newImageRect(imageGroup, “bgImage.png”, 900, 1425)

It displayed ok on the simulator for the iPhone 5 window, but when I actually installed it on my iPhone 5 and ran it, it shows up as black bars on the top and bottom part. What am I doing wrong?

Do you have an iPhone 5 splash screen in there? I built my entire app, tested it out on every device, but on iPhone 5, it had the black bars. Then I noticed…

If you’re developing an app for  iPhone5  compatibility, you might be tempted to wait until the project is complete to create these launch images. However, you must at least include the Default-568h@2x.png file from the start, even if it’s a blank image for testing. This activates the iPhone5 “tall” mode. As indicated above, this image must be exactly 640×1136 in size — do  not  flip it to 1136×640 for a landscape app.

Source: http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#launchimage

  • C

Ahhh, no I don’t have a spash screen. This might be the answer to my problem. I’ll try that, and respond here afterwards, thanks Caleb!!

Just to update this thread. The problem was indeed as described by Caleb. Thanks again!!!

Do you have an iPhone 5 splash screen in there? I built my entire app, tested it out on every device, but on iPhone 5, it had the black bars. Then I noticed…

If you’re developing an app for  iPhone5  compatibility, you might be tempted to wait until the project is complete to create these launch images. However, you must at least include the Default-568h@2x.png file from the start, even if it’s a blank image for testing. This activates the iPhone5 “tall” mode. As indicated above, this image must be exactly 640×1136 in size — do  not  flip it to 1136×640 for a landscape app.

Source: http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#launchimage

  • C

Ahhh, no I don’t have a spash screen. This might be the answer to my problem. I’ll try that, and respond here afterwards, thanks Caleb!!

Just to update this thread. The problem was indeed as described by Caleb. Thanks again!!!