title: How to update UIView.intrinsicContentSize when depending on a subview being moved in an animation?
body: <p>I have a header view which contains a label and a background image. In its "expanded" state, the label is below the background image. The grey space represents the <code>intrinsicContentSize</code>, which extends from the top of the background to the bottom of the label:</p>
  
  <p><a href="https://i.stack.imgur.com/NXnLj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NXnLj.jpg" alt="enter image description here"></a></p>
  
  <p>When it animates, the background image shrinks, and the label moves up to overlap the image. The height of <code>intrinsicContentSize</code> will match the bottom of the label's frame until it crosses over the background image, at which point it will match the height of the background image:</p>
  
  <p><a href="https://i.stack.imgur.com/SQ74K.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SQ74K.jpg" alt="enter image description here"></a></p>
  
  <p>I'm using <code>UIViewPropertyAnimator</code> to change the frames of both views in a way that is interactive and cancelable. The animation is simple, but I cannot figure out how to update <code>intrinsicContentSize</code> while the animation is running. There doesn't seem to be a way to observe the <code>UIViewPropertyAnimator.fractionComplete</code> property. </p>