Xcode 4.5 Storyboard 'Exit'

Josh Kahane picture Josh Kahane · Sep 14, 2012 · Viewed 28k times · Source

I have just installed Xcode 4.5 for iOS6 support, and I have seen a new icon called 'Exit' in my Storyboard, listed under my view controllers along with 'First Responder' etc. A little green icon labeled 'Exit'.

I can find anything on it nor work out how it can be used.

Anyone know anything about it, how it works, what its for?

Answer

Alladinian picture Alladinian · Sep 17, 2012

This is called an "Unwind Segue". Unfortunately there's no documentation for this so far except a brief mention on XCode 4.5 new features list that states:

Unwind segues can allow transitioning to existing instances of scenes in a storyboard

The good news is that there is a session from WWDC 2012 explaining those creatures (among other things).

You can just login to Apple's iOS Dev Center with your developer account details and then go to the WWDC 2012 videos page and watch "Adopting Storyboard in your App" (it's fifth from the top) The discussion of unwind segues starts at time 37:20.


Update: Here is some more info on the subject from Apple's documentation

A placeholder object named Exit for unwinding seques. By default, when a user dismisses a child scene, the view controller for that scene unwinds (or returns) to the parent scene—that is the scene that originally transitioned to the child scene. However, the Exit object enables a view controller to unwind to an arbitrary scene.

(From iOS6 docset > General > Getting Started)

And here is a nice example of how you can implement one


Another Update:

Here is a technical note from Apple regarding this topic.