1

Possible Duplicate:
How to deal with iPhone 5 screen size?

What is the general consensus on how we should be laying out our views for both screen sizes of the iPhone 5 and the previous iPhones'?

If i wanted to use two different views laid out in IB (one for 4 inch, one for 3.5inch), how would i go about dynamically choosing the initial view?

And how would i go about sharing the same view controllers with two views. The views could share the same controller code because although they will be marginally different, but contain duplicates of the same controls/buttons/elements etc just laid out differently.

Thoughts?

Community
  • 1
  • 1
Deminetix
  • 2,866
  • 26
  • 21
  • It does not answer how I can dynamically choose a view based on the screen size, or how to have two views use the same controller – Deminetix Sep 16 '12 at 17:44
  • 1
    I could be wrong but what I have read so far if you really need to, you can create two story boards one for each iphone 5 and 4. Most of my apps have screen resolution and buttons hard coded in the viewcontroller.h so its a nightmare to change them for iphone 5 – Sam B Sep 22 '12 at 11:59
  • Just add an image called Default-568h@2x.png (640x1136) to your project. That should take care of if. But if you realy want to distinguish between tall screen and normal, you can check the bounds [UIScreen mainScreen].bounds.size or here is some C# code:public static bool IsTall { get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone && UIScreen.MainScreen.Bounds.Height * UIScreen.MainScreen.Scale >= 1136; } } – j2emanue Feb 25 '13 at 19:32

0 Answers0