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

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?