title: UIImageView aspect fit and center
body: <p>I have an image view, declared programmatically, and I am setting its image, also programmatically.</p>
  
  <p>However, I find myself unable to set the image to both fit the aspect and align centre to the image view.</p>
  
  <p>In other words, I want the image to:</p>
  
  <ul>
  <li>Scale down to fit the aspect, if the image is large.</li>
  <li>Centre but not scale up, if the image is small.</li>
  </ul>
  
  <p>How do I get that?</p>