You won't be able to achieve aspect fitting of the image, filling all the whitespace, for a fixed height with a varying width.
One solution that you can have to display the image without cropping the whitespace, without having any whitespace, and keeping the image's aspect ratio intact is to keep the width varying for the UIImageView, and setting the aspect ratio constraint of the image, instead of setting the height constraint. The UIImageView would automatically enlargen and shrink based on the device width.


Don't forget to set the Content mode to Aspect Fit or Aspect Fill.
If you are using a UITableView to display the contents, you can use UITableViewAutomaticDimension to have dynamic heights for the cells, if that is what's limiting your UIImageView's height.