Can iPhone SE design work for iPhone X - ios

I have designed my app without auto layout and for the size 320*568 (iPhone SE). The design i did for iPhone SE itself worked up to iPhone 7plus bcoz of adding corresponding launch image. Even it now works for iPhone 8 plus. But for iPhone X, it doesn't seem to be appearing full screen(Pl find the below image). Is there a quick fix or do i have to use autolayout to get it right?

Autolayout is the best for the iOS design to make it responsive according to the different device, so it is suggested to use autolayout. There are some reasons for why we should use the autolayout ?
It assures that it looks fine on all the devices.
It requires less effort to make design responsive if you are looking for different sizes or orientation.
It is easy to update the design when there is new device introduced.
And for particularly your question. If you want great design on all the device including iPhone X you should use 'Safe Area' + 'Autolayout'.

Related

How to set auto layout on all iOS devices?

So basically I have this problem where all my auto layout constraints look fine on all devices except iPhone 5s and SE. Also, the constraints look different for iPad devices but are generally the same. How do I have it so that the constraints look the same on all devices??
Below shows iPhone 8 vs iPad Pro
What you are discussing is possible, it is called Trait Variation that allows you to set up layouts based on different device dimensions and categories.
Here is a tutorial that discusses it and explains how to use it:
https://www.techotopia.com/index.php/Using_Trait_Variations_to_Design_Adaptive_iOS_User_Interfaces

Worry about the 4s?

Totally newbie here...I have been working on auto layout using stacks and constraints with X code 8 and I have a very good understanding of how it works. I can get my layouts to render across all sizes in the sim looking as expected.
My one issue is that I can easily make layouts that looks good for 5 through 7 plus...but when I try to make the 4S work, it just kinda screws everything up in regard to the spacing of the layout for the other models....it still works and looks as expected, but because the 4s is so small, it ends up leaving a lot of space in the other sizes.
Should I just not worry about the 4s and make sure that my other sizes render the way I want? When I submit my app will this cause it to be rejected?
From the following link you can see that there is only about 2% of people are only using iPhone 4s. So if you targetting above this device its ok.
https://david-smith.org/iosversionstats/
Apple's latest iOS will not support iPhone 4S, which has been supported from iOS 5 all the way to iOS 9.Apple announced that the iPhone 4S will not support iOS 10 due to hardware limitations.
As mentioned in comments you can go for a custom layout for that scree size if needed.

Supporting all iphone sizes

I'm trying to create a iOS app, but I'm stuck on the layout.
I created the home view, but now I see that it's not shown in the right way in the 4S simulator.
I tried with size classes, but it looks like 4S and 6, for example, are in the same size class, and so I can't set a different dimension for views.
My goal is to support all devices, also iPads. Can someone please tell me how to do it?
Size classes mostly used for separation between ipad, apple watch and landscape modes.In potrait mode iphone 4 to iphone 6 all phone device sizes are in same class(regular height and compact width).Autolayout has many different constraints to help you to fit interfaces in same class.You should consider horizontaly/verticaly align, equal width and aspect ratio constraints.They are so flexible for smaller size changes and help you to design adaptive layout.
You should use "Reset to Suggested Constraints" for all views in your View controller. You can also check the simulated metrics for all devices without compiling the the code.
For 4s and 6 by default the size is Inferred. You should try resetting the constraints to check this for iPad as well.
I am just sharing an idea
Option1:
I think You can try adaptive Layouts and in file inspector->simulated Metrics->size-> Inferred. It works in all devices it supports both landscape and Portrait.
Option2: Go for Visual layouts they are easy to understand and they work perfect in all modes of Portrait.
I am think that you use code Instead design in main.storyboard !
for ex: create button with code
(and use Ratio in your code)
by this way i create small app for iPhone & iPad
!

Resize app designed for Iphone 6 to scale correctly in iphone 5s

Ok, here is the problem I have designed an application for iphone 6 screen without size classes and autolayout.
Looking like below in the storyboard. As you can see its simulated size is 4.7 inch.
It works perfectly when running on iphone 6 devices obviusly.
However when trying to run the app in other devices than iphone 6 it wont scale proportional.
My hope was that if I removed the lanuch screen images only keeping the iphone 6 size it would scale to fit other screens looking the same as if it where run on a iphone 6 only scaled up or down depenging on device.
My launch screen looks like this now
It does infact scale the app but it scales the app in wrong proportion making it looked chopped like this.
Iphone 5s version of the app looks like this
As you can see it scales correctly but the aspect gets wrong compared to the iphone 6 version below scaling correctly.
Here is an ipad version looking like the iphone 5s version scaling wrong.
It seems to me that the scaling works since I have removed all launch images except the 4.7 display (iphone 6) The problem however seems to be that it scales keeping the aspect of an iphone 5 in width making the iphone 6 display to wide.
I have tried to add launch images for all devices but the problem then is that I need to use autolayout and size classes to make it work.
Is there any way to for instance tell the scaling to keep aspect but use iphone 6 width and height intact without using size classes etc.
To make the question even more simple. Is there any way to scale an app made for strictly iphone 6 so resize to iphone 5s/ipad?
Any help is highly appreciated!
Well, the "trick" with removing the other launch images doesn't work, as you noticed yourself.. This automatic scaling only works from 4" to 4.7" and 5.5" and is only to support older apps on the new devices, not for general purpose "I am too lazy to support all sizes" use cases.. ;-) Apart from that, you should definitely support the native resolutions.
So, to answer your question: You can either just use Auto Layout. This is definitely the preferred approach - after all that's exactly the use case that it has been built for.
Alternatively, if you really don't want to or can't use Auto Layout, you either need to make sure to set your auto resizing masks correctly (e.g. "flexible width" on the stuff that needs to grow/shrink horizontally etc.), or adapt your frames manually in code (which partially defeats the purpose of IB).
If you didn't use Auto-Layout or Size Classes, your only hope is to programmatically change the positions/size of each element individually in the viewDidAppear or viewDidLayoutSubviews method of your LoginViewController. You would have to do it also on orientation change (if your app supports it).
It's a lot of work that can be easily be avoided by using Auto-Layout/Size Classes!

Building interfaces for 3.5-inch iPhones in Xcode 6

In Xcode 6, the way layout is done for devices of varying sizes has been changed somewhat: we now have Size Classes. But how can I lay an interface out for a 3.5-inch iPhone?
The "compact" height class doesn't seem to apply here. I understand I can change the constraint / compression resistance (etc) values, but in my case I want to be able to change the font size for this device size.
Is this completely impossible? I realize iOS 8 removes support for iPhone 4 (but not 4S). We also can't all target purely iOS 8, and need to support 7 and even 6.
There doesn't appear to be any way to use size classes to isolate a specific device size. I guess Apple didn't intend this feature to be used to build different layouts based solely on screen size, rather look at broader concepts, such as orientation and device type (iPhone, portrait or iPad, landscape). In other words "don't have different designs for iPhone 4/4s, 5/5c/5s or 6/6+"...
I have the exact same problem as the OP, in as much as I want a different layout only for 3.5" screens, but I ended up resorting to removing constraints and adjusting the layout programmatically, only for 3.5" screens.
iPhone 3.5 inches will have the following size classes:
Compact w Regular h - in portrait
Compact w Compact h - in landscape (unique for iPhone 3.5 inches)
So that is the only size classes you can use to manipulate for iPhone 3.5 inches.
It appears that some of the size classes do work with iOS 7 according to the link provided by '#Guillaume Algis' How can Xcode 6 adaptive UIs be backwards-compatible with iOS 7 and iOS 6?
However there is no info about their support in iOS 6 and still there are issues even with iOS 7.
If you really need to support iOS 6 and 7 and you are ok with the AutoLayout + multiple storyboards/xibs for different device idioms approach, than you can simply disable size classes for your storyboards/xibs using the File Inspector by unchecking "Use Size Classes" checkbox.

Resources