Avoid stretching UIImage inside my UIImageView

I am loading UIImage UImageView. The UImageView has the same width and length, and when I load the UImage, it becomes stretched.

Is there a way to load my UImage inside my UImageView without changing its proportions ?, I want the image to fit my UIImageView without warping.

Thank.

+3
source share
1 answer

Set the imageview property contentModetoUIViewContentModeScaleAspectFit

+9
source

Source: https://habr.com/ru/post/1756216/


All Articles