1

I have been struggling with this for days: I have a View Controller in storyboard which must contain four subviews filling the whole screen. Starting from y=0, I want them to represent 10%, 5%, 20% and 65% of the screen respectively on each iphone size. However, I can't find the constraints I need to do so.

Is there any way to achieve what I want?

Gannicus
  • 399
  • 1
  • 3
  • 18

1 Answers1

1

You can use AspectRatio constraint for this. Pick one item as containerView height and the other as your UIView height.

Shamas S
  • 7,507
  • 10
  • 46
  • 58