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

Joshua Michaels
Joshua Michaels
7,306 Points

Layout errors with placeholder UIImageView instances

Getting layout errors when trying to add constraints to the placeholder images to the Playlists view.

See photo to see the orange/red boxes that show up. I'm following the videos exactly.

If you try to update the frames, the images are resized to the actual image size unless you use "Placeholder" in Size Inspector > Intrinsic Views.

Does anyone know how to resolve these issues?

Image Constraints

Joshua Michaels
Joshua Michaels
7,306 Points

Maybe this has to do with an updated version of XCode and Swift but unless you specify the top and bottom constraints with the middle placeholder images, you will get these errors/warnings.

Once those have been specified and the Equal Height/Equal Width boxes are checked, everything works.