0
votes

I have a view at the bottom of my view controller which has the following constraints:

  • align centre horizontally
  • fixed aspect ratio (1:1)
  • proportional width to width of view controller
  • bottom space of -50

How do I make the bottom space constraint proportional to the height of the view using Auto Layout? Meaning that if the height of the view is 250, the bottom space will be -50, but if the height is 300, the bottom space will be -60, and so on (the proportion is fixed at 0.2)?

1

1 Answers

3
votes

Use the multiplier value. You want the bottom of your view to be 0.8 times the bottom of the superview.

enter image description here