I got app which can add photo from camera or gallery. After adding each photo showes in UIImageView
. But they show with bad aspect ratio. Photoes are extended o
Doing myImageView.contentMode = UIViewContentModeScaleAspectFit;
is one option.
But it isn't enough because it changes the aspect ratio of the image, but it doesn't change the source image.
The only way to do that is to use the UIGraphicsImageContext
as explained there:
Resize UIImage with aspect ratio?