Aspect Ratio Behavior

Hi All,


I'm trying out Swift with XCode 7.3.1, following the tutorial here:

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

When I pin the aspect ratio of the image view as directed, I get some red lines around the view - it doesn't look quite like the image provided in the tutorial.

And, if I change the width after the aspect ratio is constrained, shouldn't the height change as well? I don't know if this is a bug or what. Any help appreciated!


Here's what the project looks like right after pinning the aspect ratio:


Here's what it looks like after changing the width from 320 to 400. The height remains unchanged in spite of what the red indicators denote:


Just so you know, mods are the only ones that can see inline images in comments here.

What do you get when you click on the disclosure circle (orange or red) in the panel on the left listing all objects in the views ?

Sorry I didn't know about the photos until after I posted. After some research I found out the Image View was supposed to be inside the Stack View for this to work properly. The simulation was also messed up because of my error. The tutorial was not exactly clear on this either. Thanks for responding. I'm still learning so I'm sure I will have other questions 🙂

Aspect Ratio Behavior
 
 
Q