0

Is there any tutorial available for creating Universal UI which can run on iPad as well as iPhone on different resolution. I tried looking in the official documentation, but couldn't find anything about UI files.

0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184

1 Answers1

1

I notice you've tagged this question with Marmalade, so I'm assuming you are talking about how to write a Universal app in Marmalade? If so then creating a Universal UI is pretty much up to you to implement in the best way you see fit.

By default all Marmalade apps are Universal apps, though you can limit to iPad only with the MKB setting iphone-ipad-only.

Marmalade does come with the iwui module that allows you to lay out user interfaces with buttons and text boxes etc. but ultimately unless you have a very simple UI you'll need to either provide different UI layouts for each screen resolution/orientation you wish to support, or do some fancy laying out in code.

Apple wisely chose to persuade developers into creating separate UIs for iPhone and iPad since the one-layout-fits-all approach generally looks bad at any screen size.

Wave 1
  • 61
  • 1
  • oh, so using different UI for different resolution is the best possible solution. This'll increase the asset size by almost double, won't it? – 0xC0DED00D Jun 09 '12 at 17:02
  • Not necessarily. It's only the layout of your buttons, images etc. that has to be different and that is fairly minimal data to duplicate as it should be just a few numbers for screen positions, widths, heights etc. Bitmaps are going to be the biggest memory consumer but you may find you can get decent performance and appearance by only using high resolution assets throughout, scaling images down in size for display on lower resolution devices. Obviously this depends on the images in question but scaling down in size usually looks OK. – Wave 1 Jun 15 '12 at 17:19