-1

I wanted to create 6 subviews in a view, which have different width & same height. It should fit horizontal, all screen resolutions for iPad and iPhone.Can anyone please help me on this.

RashmiG
  • 318
  • 1
  • 4
  • 11

1 Answers1

0

Without any additional logic (i.e., which views to make smaller or not if the content does not fit), you can do this like this: if the views are ligned up from left to right and numbered 1 to 6

  • defining the leftmost view (1) with a distance to left edge
  • defining the rightmost view (6) with a distance to right edge
  • defining the distances between the views (i.e. 1 to 2, 2 to 3 etc.)
  • setting the horizontal "compression resistance priority" to differing values

You can set the same height individually, or just for one view and as equal height for the other views.

Mundi
  • 79,884
  • 17
  • 117
  • 140