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
Lee Ravenberg10,018 Points
A segue an instance of UIStoryBoard?!
During the review-working-with-multiple-view-controllers quiz, it is asked what a segue is. The answer appears an instance of the UIStoryBoard class.
Now I am curious where to learn about this class structure; when I read the API reference on UIStoryBoardSegue, it says to inherit from NSObject, not UIStoryBoard.
Chris McKnight11,045 Points
It says that UIStoryboardSegue inherits from NSObject. NSObject is the base class that all objects inherit from.
In the subclassing notes section, they say to inherit from UIStoryboardSegue when you want custom transitions.
The quiz references the wrong class. It should be UIStoryboardSegue in the quiz which you have discovered. UIStoryboard is used under the hood with the info.plist to load the storyboard and run it. You can programmatically do this as well if you wanted to switch between storyboards with your code.
Robert Baghai5,492 Points
A segue is a way to transition from one ViewController to another. In addition to actually navigating to a new ViewController, a segue also allows you to pass data from one ViewController to another if you so choose to do so.