Easiest way to customize UI for all iPhone sizes using xib

I am working on an iPhone app that needs to run on all iPhone sizes i.e. 4s, 5.6 and 6 plus in ios 8 and up. What would be the easiest way to customize the UI to support all screen sizes. I am using Xib.

Thank.

+3


source to share


3 answers


Autoresizing

is the easiest way to customize the UI to support all screen sizes in portrait mode as @Nishant explained instead of using constraints

in AutoLayout

. But if you want to customize the same UI in landscape and portrait then use AutoLayout

and Size Classes

as explained by @ezCoding.



+3


source


In your storyboard, make sure you are using the settings Any Width | Any Height

:

enter image description here

Also check Use AutoLayout

and Use Size Classes

:



enter image description here

It will take some time to read this to figure it out .

+3


source


Check all sizes of iphone4,5,6 and 6+ in xib

and set the layout to its pic

you can set the size here and check also.

+2


source







All Articles