title: UIView with dynamic height that uses intrinsicContentSize
body: <p>I am trying to create a custom container view that has a UIImageView and a multiline UILabel as subviews. To make the view work nicely with autolayout, I am overriding intrinsicContentSize as below:</p>
  
  <pre><code>- (CGSize)intrinsicContentSize
  {
      return [self sizeThatFits:self.bounds.size];
  }
  </code></pre>
  
  <p>The size calculated in sizeThatFits has the same width, and adjusts the height so that the label and image are not clipped. This works well, but I was surprised to see in the docs the following comment:</p>
  
  <blockquote>
    <p>This intrinsic size must be independent of the content frame, because there’s no way to dynamically communicate a changed width to the layout system based on a changed height, for example.</p>
  </blockquote>
  
  <p>If that is the case, what is the autolayout way to adjust the views current height based on its width and content? Should I be approaching this in a different way? </p>