From the URL Image in Mail
I\'m adding image to mail view. It will show full image. But I want to calculate, proportionally change the height and width of the image.
let imageView: UIImageView = //this is your existing imageView
let imageViewHeight: CGFloat = imageView.frame.height
let imageViewWidth: CGFloat = imageView.frame.width
Some of the anwsers above, don't work well when rotating device.
Try:
CGRect imageContent = self.myUIImage.bounds;
CGFloat imageWidth = imageContent.size.width;
CGFloat imageHeight = imageContent.size.height;