On my iOS app written in Swift 3, I have 4 UIImages, each 2 in a UIStackView, and the 2 UIStackViews inside another UIStackView, as shown in the picture below:
In the picture you can see the division I made to the images.
You can also see the problem, when the images are exiting the screen and the user can't see the full image because it's get cropped.
All images are on "2x" size on their Image Set in Assets.xcassets
.
On Main.storyboard
on the Attributes Inspector I changed the Content Mode to "Scale To Fill" for all 4 images. I also did that in code:
phoneCallImage.contentMode = UIViewContentMode.scaleAspectFit
sendEmailImage.contentMode = UIViewContentMode.scaleAspectFit
sendSmsImage.contentMode = UIViewContentMode.scaleAspectFit
openFacebookImage.contentMode = UIViewContentMode.scaleAspectFit
I also tried to do that with the full UIStackView (Images Stack View in the picture):
imagesStackView.contentMode = UIViewContentMode.scaleAspectFit
What can I do to fix this and show the full image without cropping it?