Autolayout Parent UIView is Maximum of Child ViewsWed Mar 04 2020

I've hit this challenge way too many times and now that I know the solution I don't ever want to be stumped by it again.

A parent UIView() has multiple subviews. We'll call the parent p and the children a and b. The example uses Stevia.

p.sv(a, b)
a.centerVertically()
b.centerVertically()
p.Height >= a.Height
p.Height >= b.Height

This example also works horizontally, but you can figure out how to use Width instead of Height.