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 Working With Multiple View Controllers Master-Detail User Interface

Sean Batir
Sean Batir
2,519 Points

Question about Main Storyboard and Viewcontroller via iOS Swift

After I create "PlaylistDetailViewController.swift," the instructor tells us to "click on the second ViewController in the main.storyboard. However, I don't have the option to click on a second viewcontroller, because none show up. The only storyboard element present is the original viewController containing the single button that previous tutorial versions have gone through.

1 Answer

Steven Deutsch
Steven Deutsch
21,046 Points

Hey Sean Batir,

You need to add another view controller to your Main.storyboard file. You can do this by dragging one into your storyboard from the object library. The object library is the same place where you get your labels and buttons from to drag onto the storyboard.

Once you do this, make sure you add another ViewController file to your project and link the ViewController in the storyboard up to that new ViewController file. You do this through the identity inspector (its a tab in the IB panel on the right side, right next to the attributes inspector).

Good Luck!

PS. I recommend rewatching the video as your instructor goes through this all!