iPhone / iPad universal build without the black bars on iPad?!

Hi,

I’ve created a ‘universal’ app for iPhone 4 (retina) and iPad 3 (retina) using the @2x approach but on the iPad I have black lines either side, is there an easy way to eliminate these?

Ta.

The quickest and easiest way is to alter your config.lua file:

application = { content = { width = 320, height = 480, scale = "zoomEven", imageSuffix = { ["@2x"] = 2.0, }, }, }

“zoomEven” will uniformly scale content to fit, but some display objects may be off screen.

“zoomStretch” will scale horizontal and vertical content independently, which means that your content will usually look incorrect (e.g. circles will be ovals).

For more useful variations see Rob Miracles post from a few months ago:

http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

I generally use letterbox mode, with background images that are 768 x 1136 - tall enough for the iPhone 5 and wide enough for the iPad.

If I need to utilise the extra space on IP5/IP, I have global variables called xO and yO which are set depending on which device the game is running on. For instance, for a score text object at the top of the screen, I would set it is as scoreText.y = 20 - yO, so it will be at the top whether running on iPhone 4 or 5.

Thanks all, Rob Miracles ultimate config has REALLY helped me out!

The quickest and easiest way is to alter your config.lua file:

application = { content = { width = 320, height = 480, scale = "zoomEven", imageSuffix = { ["@2x"] = 2.0, }, }, }

“zoomEven” will uniformly scale content to fit, but some display objects may be off screen.

“zoomStretch” will scale horizontal and vertical content independently, which means that your content will usually look incorrect (e.g. circles will be ovals).

For more useful variations see Rob Miracles post from a few months ago:

http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

I generally use letterbox mode, with background images that are 768 x 1136 - tall enough for the iPhone 5 and wide enough for the iPad.

If I need to utilise the extra space on IP5/IP, I have global variables called xO and yO which are set depending on which device the game is running on. For instance, for a score text object at the top of the screen, I would set it is as scoreText.y = 20 - yO, so it will be at the top whether running on iPhone 4 or 5.

Thanks all, Rob Miracles ultimate config has REALLY helped me out!