How to set up image view so that image fill the whole size and doesn't stretch in Swift?

625 Views Asked by At

I want to show 4 imageViews on my screen. The images should always fill the whole image view area. The problem is, that I don't know how to fix that without stretching the photo.
I've tried nearly everything but nothing really seems to work. Even if I set the contentMode, it doesn't work.

If I set the contentMode to scaleAspectFit, it looks like that:

scaleAspectFit

If I set it to scaleAspectFill, it looks terrible and if I set the contentMode to scaleToFill, it looks like that:

http://i65.tinypic.com/6fxxzt.jpg

Anyway, do you know how to combine these 2 images, so that the whole size is filled and the image isn't stretched?

0

There are 0 best solutions below