title: UIImageView aspect fill - image outside UIImageView bounds
body: <p>I have a UITableView with cells that contain images. I want to download a big image from the server and insert it into my cell.</p>
  
  <p>My UITableViewCell has a fixed height and fills the entire width of the screen. The best solution will be to resize the image proportionally to fit the screen width and then crop the area with the fixed height, but I found that resizing a UIImage is really hard, and I don't understand why. If you can help me with this, it will be very good.</p>
  
  <p>Anyway, at the moment, I am trying to use the AspectFill mode (I already tried AspectFit and ScaleToFill and it is not what I am looking for) for my UIImageView in UITableViewCell, but for some reason, my image is higher than the cell height:</p>
  
  <p><a href="https://i.stack.imgur.com/0b9gE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0b9gEl.jpg" alt="enter image description here"></a></p>
  
  <p>I don't understand what I am doing wrong. It is not auto layout, it is fixed height. Why didn't it work?</p>