How to Support All iPhone Screen Sizes

1.5k Views Asked by At

I have an app in Xcode 6.2 with the storyboard supporting all devices. For some reason, whenever I load the application on the iPhone 6+, or iPhone 4s, or iPad, the screen doesn't take the size of the iPhone/iPad. However, on an iPhone 6, 5s, and 5, the screen takes the full size of the iPhone. Why is this? I am very unfamiliar with sizes and how to properly support all sizes. Right now, I have set the screen sizes in the storyboard for each view controller to 320 x 568. The width is "Compact" and the height is "Any".

If this has anything to do with this, my iPad screen comes out blank. It's just white. Apple recently rejected my external testers app submission due to this.

I have done lots of research on these 2 questions, but I had a hard time understanding anything, as I am new to iOS Development.

3

There are 3 best solutions below

0
On

iphone:

iphone 4- 320x480

iphone 5- 320x568

iphone 6- 375x667

iphone 6plus - 414x736

and also ipad:

ipad mini - 768x1024

ipad air - 768x1024

ipad pro 10.5 - 834x1112

ipad pro 12.9 - 1024x1336

0
On

To properly handle varying sizes and how that affects your layout you will want to use auto layout. Check out this great tutorial from ray wenderlich to get you started. Once you get started feel free to post more specific questions about any roadblocks you run into. Good luck!

http://www.raywenderlich.com/64392/video-tutorial-beginning-auto-layout

0
On

When you want your app to work on any device, ideally you should keep the width and height both set to "Any". You should switch to "Compact" or "Regular" width or height only if you have any requirement specific to a particular device. To understand things in detail read more on Size classes. It is very nicely documented in this Apple developer site.