In the above, the orange, blue and green views are subviews of the yellow view. I need the parent (yellow) view's borders to hug its subviews. The only movement that's occurred between the two images is the green subview moving up and to the right.
Because the bottom of the orange view is now lower than the bottom of the green view, the parent view hugs the orange view's bottom edge.
Similarly, because the green view's right edge is past the blue view's right edge, the parent view hugs the green view's right edge.
Is there a way to do this with Auto Layout constraints, or would I have to write custom code?