I would like to change the height of imageview based on how much height the image occupies in imageview.
I am using content mode Aspect Fit
Any ideas on how to do that ?
for me :
let image: UIImage = UIImage(named: "")
print(image.size) // 400x400
let scaleFator = UIScreen.main.scale //3
let height = image.size.height / scaleFator ///here the actual height of image.