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

László Győri
László Győri
82,430 Points

Why not use IBOutlet Arrays here as well?

Working through both Playlist app (Obj-C and Swift) tutorials I've noticed that they take a different approach in connecting the UIImageViews to the code. The Swift one uses a less efficient version i.e. doing it one by one and adding them to an array later, instead of using IBOutlet collections like the Obj-C version.

@IBOutlet var playlistImageViews: Array<UIImageView>!

This works just fine for me. Am I missing something here?