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.
How can I get the height and width of UIImage
?
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.
How can I get the height and width of UIImage
?
There are a lot of helpful solutions out there, but there is no simplified way with extension. Here is the code to solve the issue with an extension:
extension UIImage {
var getWidth: CGFloat {
get {
let width = self.size.width
return width
}
}
var getHeight: CGFloat {
get {
let height = self.size.height
return height
}
}
}