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 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!