Resize container UIView to match height of visible subview after hiding mutually exclusive subview
<p>ParentView contains ChildView1 and ChildView2. These subviews are of different heights.</p>

<p>ChildView1 is taller than ChildView2. Only one subview is shown, e.g., if ChildView1 is visible then ChildView2 is hidden. Both ChildView1 and ChildView2 use custom XIBs.</p>

<p>Both subviews "drive" the height of ParentView, that is the AutoLayout constraints are wired such that ParentView is as tall as ChildView1 or ChildView2, and no taller.</p>

<p>The problem is hiding ChildView1 and showing ChildView2 does not "shrink" ParentView to match the height of ChildView2. It remains at the height of the taller subview, ChildView1.</p>

<p>Calling <code>sizeToFit()</code> and <code>setNeedsLayout()</code> does not change things.</p>

<p>How to force ParentView to match ChildView2's height when ChildView1 is hidden?</p>