I\'ve an UIImageView with content mode Aspect Fit of size 220x155. I\'m dynamically inserting different images in different resolutions, but all larger than the size of the
Once the imageview's image is set to the new image (and thus scaled) you can get the height of the image inside the imageview (imageview.image.size.height) and set the imageview's height (frame) accordingly.