How to Support All iPhone Screen Sizes - ios

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.

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

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.

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

Related

Creating auto layouts for iphone se?

I'm making an app that I want applicable to all sizes but the problem is that iPhone 8 up to iPad devices are good but I noticed that the iPhone SE and below iPhones are not being supported when you make your app for iPhone 8 and up because it's so small. Now does that mean I have to create a scroll view for all my pages not since it doesn't fit for iPhone SE and below or is it recommended to not just include iphone se size and below for any future app?
It's recommended to create your app to be universal and support all screen sizes to hit users from the market as much as you can , regrading support for IPhone 4 , 5 I think you need to have a scrollView in any screen that you think it may exceed screen height for these 2 devices , or create items height in proportional to screen height to guarantee that all UI elements will fit in the screen

Removing launch screen file from Info.plist scales the views

I noticed something that when you remove the launch screen file entry from the XCode Info.plist file, any view of any view controller becomes scaled according to the screen size, so the views appear zoomed in on large screen sizes such as the iPad Pro (12.9 inches) and appear somehow zoomed out on smaller devices (iPad Pro 9.7 inches).
In that case it seems that the Auto Layout constraints have no effect as the scaling is done automatically.
I really can't understand what does this has to do with the layout constraints, so I appreciate if any one can explain what's the reason for that.
Without being able to provide deep details, iOS uses the launch screen definition (view or static images) to determine which size classes the app should use. If you have not supplied those, it seems you get scaling that you generally do not want.
That doesn't mean auto-layout no longer has any affect... it just means that the auto-layout engine is not using the current screen size for its size/positioning calculations.
You'll see very similar results if you explicitly set your project for iPhone only.
Simple, obvious solution: Don't remove the launch screen.
Yes this is expected behaviour... Same is for iPhone 6 Plus. If you remove the iPhone 6 Plus launch screen, it will display the iPhone 6 scaled version.
This is just for backward compatibility. If your app is not ready for iPad Pro or iPhone 6+, scaled version can be used by removing the respective splashing screens.
All current iPhone apps or iPad apps in AppStore those are not optimised runs as a scaled version.

iOS User Interface for different devices in iPhone 4, 5, 6+ and iPad

From what I know the resolution in iPad is higher than iPhone therefore the same width and height point in storyboard in iPhone will appear to be bigger in iPad. However, I didn't notice the size differences and it seems to be the same which look the same in iPad.(the height of textfield)
Are there any ways for making them scale in the same aspect fit? By right elements in iPad should be bigger due to the resolution. Autolayout has been used in the following picture.
How do I code for user interface for iPhone 4 and iPhone 6+? The same box will appeared to be too big in iPhone 4.

Autolayout iPhone 6 doesn't work

I developed an app for iOS, this app should work for iPhone 4s, iPhone 5, iPhone 5c, iPhone 5s, iPhone 6 and iPhone 6+. I read the apple documentations and I found that I've to design only a Storyboard in which I use auto layout and size class.
I designed the user interface with Storyboard and I set all constraints, but when I run it on my iPhone 6 it shows me the user interface not optimized for the display of my iPhone 6. Here's a sample:
As you can see it shows me the view with big operator log, big clock, big battery indicator and big keyboard.
Why it doesn't work?
Should I add the splash screen for Retina 4.7 and Retina 5.5?
You need to add a "launch screen file" which is a XIB or Storyboard showing the screen that is shown while launching.

Bound iPhone App to 3.5 inch Frame in iPhone 5

Wrote an app for iPhone in 3.5 inch mode, and now - I need to make it work for iPhone 5 (4-inch retina).
I'm getting a little complicated with Auto-layouts and can't seem to make it work. Is there some way I can just bound the app to a 3.5 inch frame on an iPhone 5 in the middle of the screen (not with the ugly white space in the bottom I see now), and in that frame it would work like and iPhone 4?
I know it may not be the optimal solution, but I need to publish the app and for now it will do.
Thank
As the responses indicated - this should not be done.
I fought with the layouts until I made them fit 4 inch screens too. It's the only way to go.

Resources