You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this line: _iconImageView = UIImageView(frame: CGRectMake(0, 0, 21, 23))
you can see that the image view is not a square.
And in this line: _iconImageView?.contentMode = UIViewContentMode.ScaleToFill
... the content mode is set to .ScaleToFill which does not maintain the image aspect ratio.
Solution
If you set it to .ScaleAspectFill it will maintain the ratio and not distort the images.
The text was updated successfully, but these errors were encountered:
Hey, I noticed that some of my icons seemed a bit squished. I checked in the code and found this:
In this line:
_iconImageView = UIImageView(frame: CGRectMake(0, 0, 21, 23))
you can see that the image view is not a square.
And in this line:
_iconImageView?.contentMode = UIViewContentMode.ScaleToFill
... the content mode is set to .ScaleToFill which does not maintain the image aspect ratio.
Solution
If you set it to .ScaleAspectFill it will maintain the ratio and not distort the images.
The text was updated successfully, but these errors were encountered: