How to handle iPhone 4s, 5, and 6 screen sizes and make all content the same across all devices
I am using Xcode 6.1 and in one of the views I have it contains many shortcuts. However, these shortcuts look different on each of the different devices. Although I am adding constraints for all shortcuts, I still face the same problem.
How can I get the same view layout across all devices? How can I make the width and height of each label flexible depending on the screen size? Do I need to create different xibs for each device?
The following images showing the result are obtained with automatic resizing and constants enabled.
on iPhone 6
on iPhone 5
on iPhone iOS 7.1
source to share
We have provided a simple solution. By using Aspect Ratio Constraint , we can get a relative appearance across all device screens.
I had the same problem and found this -> http://mathewsanders.com/designing-adaptive-layouts-for-iphone-6-plus/
Therefore, when designing with a minimum and high screen resolution, we cannot set a specific width and height for all controls, as this may seem strange. Thus, using this constraint, we can have a relative view for all screens.
If you don't want to use constraints or want to keep the same width and height, you can add a scrollview to hold all the controls. For this, you can set a change frame for the scrollview with a fixed content size.
source to share
One soul is that you can create a story board for each screen size like for iphone 5, one for iphone 6 and one for iphone 6+, and in your AppDelegate method "didFinishLaunchingWithOptions" you can get the screen size and popup storyboard in this case you can set different limits depending on the screen size
source to share