Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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':

http:/www.better-photography.com/Treehouse%20question/image1.png

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

http:/www.better-photography.com/Treehouse%20question/image2.png

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:

http:/www.better-photography.com/Treehouse%20question/image3.png

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!

Mary