José Joel.
José Joel.

Reputation: 2050

Avoid stretching of UIImage inside my UIImageView

I'm loading an UIImage UIImageView. The UIImageView has identical width and length, and when I load an UIImage it gets stretched.

Is there any way to load my UIImage inside my UIImageView without change in its proportions ?, I want the image to fit inside my UIImageView without deformation.

Upvotes: 3

Views: 1787

Answers (1)

Vladimir
Vladimir

Reputation: 170859

Set your imageview's contentMode property to UIViewContentModeScaleAspectFit

Upvotes: 9

Related Questions