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 Adding Multiple Playlists

Muji Paracha
Muji Paracha
1,852 Points

Does anyone know how to have container squares automatically display in one scrollable view?

I was wondering, if you're getting say playlist info from a server, and you didn't know how many playlists there were, does anyone know how you could make your app create a container automatically for every playlist retrieved from the server? So if the server returns 20 playlists, there will be 20 containers to scroll through on the app. And then how do you connect all those containers to their IB action, since you don't know how many containers there will be?

2 Answers

Caleb Kleveter
MOD
Caleb Kleveter
Treehouse Moderator 37,862 Points

That is covered in the Build a Blog Reader iPhone App course, but it is Obj-C, not Swift. If you want to suggest a course you can tweet Pasan at @pasanpr.

Robin Malhotra
Robin Malhotra
14,883 Points

You'd use something called a Collection View.