Reputation: 270820
I put an image view in a static table view cell. The image is now being stretched to fit the whole view. I want the image to:
First I went to the docs of UIImageView
. But didn't find anything useful. Then I looked at the docs of UIImage
and found UIImageResizingMode
. But that enum only contains Stretch
and Tile
, which is not what I wanted. I then found this post which told me to
logo.contentMode = .Center
But the image is still stretched. I then tried this
logo.contentMode = .ScaleAspectFill
But the result is the same.
Please tell me a good way to do this!
Additional info:
The image view has the following constraints:
Upvotes: 1
Views: 60