title: UILabel height depending on font size
body: <p>I am using a <code>UILabel</code> in a <code>UITableViewCell</code> to display a title. Normally the text is not too long and therefore the font size can be large. Notice how the text fills the height of the<code>UILabel</code> like normal.</p>
  
  <p><a href="https://i.stack.imgur.com/dQlXX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dQlXX.png" alt="enter image description here"></a></p>
  
  <p>However, when there is a larger title, I want the <code>UILabel</code> height to reduce to accommodate the smaller font size and not leave a blank gap in its place. Currently, my configuration produces this effect.</p>
  
  <p><a href="https://i.stack.imgur.com/1iASC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1iASC.png" alt="enter image description here"></a></p>
  
  <p>I am using constraints in my storyboard and have deliberately not set a fixed height constraint. Here are the relevant constraints added:</p>
  
  <p><a href="https://i.stack.imgur.com/uVoPV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uVoPV.png" alt="enter image description here"></a></p>
  
  <p>I may have made a rookie error in my configuration as I can't remember this effect happening before, but it is giving me real headaches (and a bad looking UI).</p>