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 Build a Playlist Browser with Swift Refactoring Our Code Tapping On Our Playlists

Tom Davis
Tom Davis
1,796 Points

Other Playlists' Images Not Spaced Right

Playlists 1 and 2 have images that load fine in the details view of the playlist. However, the other 4 have images that seem too far up on the screen.

The video tutorial skips showing these 4 working so I don't know if it's me or the tutorial code that causes this.

3 Answers

If you take a look at the images, you can see some white space at the top of both the shoe and the coffee. There is no space above the other images. I think this is why some of the icons are way up at the top.

Hey Tom,

No doubt you would've figured this out by now, but I'll still post up how I fixed this problem. After spending 20 minutes going over the original project in the downloads, I discovered that if you select the image view and then go into the Attributes Inspector then under the View heading and then Mode, select Center from the dropdown list it fixes the issue and all the playlist album covers position as expected.

Hi Tom,

Same thing happened to me. If you open up size inspector in the Main.storyboard file you can edit the constraints and set the bottom space to 2.