Anyone?
Can you print out the values for display.contentHeight and display.contentWidth? That way we can figure out exactly which configuration is being used.
Also, can you post the code where you’re loading your backgrounds? What size are they?
Hi Rob,
I printed the values in the emulator and this is what i got
for display.contentWidth - 568
for display.contentHeight - 320
in the device (using the xcode organizer console) i got
for display.contentWidth - 480
for display.contentHeight - 320
this is the code for my background image
background = display.newImageRect(“images/background_menu.png”, display.contentWidth, display.contentHeight)
background.anchorX = 0
background.anchorY = 0
background.x = 0
background.y = 0
my background image is
1136 × 640
My app runs on landscape mode.
Do you have the required file: Default-568h@2x.png (a 640x1136 PNG file) in the folder with your main.lua?
Yes I have that image in the same folder with the main.lua
Do you have the exact file name (It’s case sensitive on the device)? The file has to be exactly 640 wide and 1136 high. If you have it 1136 w and 640 high, it could cause problems.
Yes i do. I have look at that file over 100 times by now to make sure it’s correct and it is lol
Then the only logical other issue would be either an error in your config.lua or the device thinks it’s display.pixelHeight is 960 or less. The only real reason for this 2nd option is if iOS doesn’t like that Default-568h@2x.png file.
Rob
Hi Rob I fixed it now. I think IOS didn’t like the file. I created a brand new Default-568h@2x.png and for some reason that fixed the problem. Thanks s lot for the help.
There is a place where you can copy the file name that has an ndash character instead of a hyphen. It burns people frequently.
Anyone?
Can you print out the values for display.contentHeight and display.contentWidth? That way we can figure out exactly which configuration is being used.
Also, can you post the code where you’re loading your backgrounds? What size are they?
Hi Rob,
I printed the values in the emulator and this is what i got
for display.contentWidth - 568
for display.contentHeight - 320
in the device (using the xcode organizer console) i got
for display.contentWidth - 480
for display.contentHeight - 320
this is the code for my background image
background = display.newImageRect(“images/background_menu.png”, display.contentWidth, display.contentHeight)
background.anchorX = 0
background.anchorY = 0
background.x = 0
background.y = 0
my background image is
1136 × 640
My app runs on landscape mode.
Do you have the required file: Default-568h@2x.png (a 640x1136 PNG file) in the folder with your main.lua?
Yes I have that image in the same folder with the main.lua
Do you have the exact file name (It’s case sensitive on the device)? The file has to be exactly 640 wide and 1136 high. If you have it 1136 w and 640 high, it could cause problems.
Yes i do. I have look at that file over 100 times by now to make sure it’s correct and it is lol
Then the only logical other issue would be either an error in your config.lua or the device thinks it’s display.pixelHeight is 960 or less. The only real reason for this 2nd option is if iOS doesn’t like that Default-568h@2x.png file.
Rob
Hi Rob I fixed it now. I think IOS didn’t like the file. I created a brand new Default-568h@2x.png and for some reason that fixed the problem. Thanks s lot for the help.
There is a place where you can copy the file name that has an ndash character instead of a hyphen. It burns people frequently.