UIImageView: How to show scaled image?

Hi all,

I'm new to iOS app development and I begun to learn from this great tutorial:


Start Developing iOS Apps (Swift)

https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/WorkWithViewControllers.html#//apple_ref/doc/uid/TP40015214-CH6-SW1


Everything looks great but when trying to load an image from "Camera roll" on the simulator, I get the image shown oversized and filling all the iPhone simulator screen instead of just showing into the UIImageView box as shown on tutorial images.


The funny fact is that also downloading the correct project provided at the end of the lesson (see the bottom of the page) I get the same issue.


Googling around I get some ideas to insert a:


photoImageView.contentMode = UIViewContentMode.scaleAspectFit


after loading image from the camera roll, but lead to no results...


I'm using Xcode 9.2 with deployment target 11.2 and iPhone 8 plus as a target for the simulator.


Any help is apreciated.


Francesco