Best way to handle iPhone iPad menus

Hey guys, this is more of a theory question than a question on programming.

What is your approach to handling the 4 different resolutions of the iPhone / iPad?

I have been creating a script called Menu Controller. With the iPhone, I make a box that is 320x320, center it depending on the orientation, and then draw the menu in the box. Obviously, this isn’t the best way of doing it, but it does create a single set of menu buttons.

I also do the same approach using iPad. 768x768, center it based on orientation, and the draw a single menu.

Is there a better way of developing menus such that I only create a single menu for both the iPhone and iPad? How do you approach creating menus for 4 different resolutions in a single game?

I am interested in any thoughts on supporting the multiple screen sizes too:

  • Is it possible to detect the screen dimensions at run-time?
  • Is it possible to get notified when they change (i.e. orientation change)?

My preferred approach would be a different GUI area for each corner. In some cases it would be better to swap out a different GUI depending on the screen-size too - i.e. bigger controls on iPad.

[edit]
Sorry, the above relates to in-game UI, not a menu. We used your approach for our iPhone game Sheepish. That way it was orientation-independent.

There is a Screen.width and Screen.height value which can be read. There is also a Screen.resolution. Basically, I would recommend reading on Screen in the documentation and you should be able to find what you want.