Xcode 5 : Different screen sized iPhones Autolayout views resizing issue

219 views Asked by At

Using Xcode 5, Storyboard and trying to make an application to work in both 3.5 inch and 4 inch screen iPhones. I am new to AutoLayout. Trying to figure out the below. Got View control screenshot
Trying to set autolayout such that the three black background views are not resized when different screen sized iPhones are used.

Added the following constraints:

A) Release 1 (blackscreen): 1. Top Space to Superview 2. Leading Space to Superview

B) Release 2 (blackscreen): 1. Leading Space to Superview 2. Trailing Space to Superview

C) Release 3 (Blackscreen): 1.Leading Space to Superview 2. Trailing Space to Superview 3. Bottom Space to Superview

A & B are set to have same height

Above all set for 4 inch screen But when 3.5 inch screen size is selected as simulator,

A & B are getting collapsed on each other. How to have the Equi-distance between all the three views ?

Can extra Empty views in between the views to solve this issue ?

1

There are 1 answers

0
Dileep Mettu On

Little relief by following the below:

  1. Add vertical spacing between A & B
  2. Add vertical spacing between B & C with priority 380
  3. Still not exact spacing is achieved but this looks like a heads-up for the solution.

Would update the post once its completely solved. Still more labels, are to be added into each A, B & C to show the views as planned.
enter image description here