Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Simple Stack Views: Interface Builder

Mary Kenkel
Mary Kenkel
4,028 Points

'Simple Stack Views: Interface Builder': Label disappears when Fill Proportionally is chosen

I'm working on 'Simple Stack Views: Interface Builder', the second video of the Stack Views Cookbook.

The problem I'm having is that the top label disappears when I set the distribution for the stack to 'Fill Proportionally' .

I think that this is due to the outline of the image view that contains the photo in the layout. The box of the image view extends pretty far beyond the boundaries of the photo both above and below the image. And it looks like that extended box is hiding the top label.

In the screenshot below, you can see that both labels show when the distribution is set to 'Fill':


But the top label disappears when the distribution is set to 'Fill Proportionally':


In the screenshot below, you can see the outline of the image view. It extends beyond the bottom of the photo and looks like it is obscuring the view of the top label:


Can anyone tell me what Iā€™m doing wrong here? Is the box of the image view the problem? If it is, is there a way to make the outline hug the boundary of the photo more closely?

Pasan Premaratne , would you have time to give me your thoughts?

Thanks in advance!