Sudeep
Sudeep

Reputation: 806

Bottom space constraint proportional to height of view

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

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)?

Upvotes: 0

Views: 1113

Answers (1)

rdelmar
rdelmar

Reputation: 104082

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

Upvotes: 3

Related Questions