Right-clicking the Exit icon yields an empty window. Can't Ctrl-drag a connection to any IB elements or corresponding source files. Docs give no love. Doesn't appear in nib files, only storyboards. My assumption is that it's a corollary to segues, but I don't see any new methods to back it up. Anyone?
相关问题
- Applying corner radius to a specific UIView corner
- CoreBluetooth - Can connectPeripheral be called mu
- Scroll view scrolling up & down on button click [d
- NSTextField font styling resets when selected
- XCode's svn “abort trap: 6” message
相关文章
- Xcode: Is there a way to change line spacing (UI L
- Popover segue to static cell UITableView causes co
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
- Why are my UIView layer properties not being set w
- UIActivity with no settings for Facebook
- Rotate (angle) a UIView, using User Defined Runtim
- How to add a bar button item in interface builder?
- NSAttributedString '\\n' ignored
As addition to Eric answer here is how it works with swift:
The function you add to the destination controller looks like:
I had a hard time following the accepted answer so here is more detail.
Given the photo below on view controller C you can "exit" back to any view controller in the segue path.
ViewController A you can write:
ViewController B you can write:
ViewController C you control drag from "back" button to the green exit option and select back: ViewController C you control drag from "done" button to the green exit option and select done:
Note: Even though the methods are on other view controllers they show up for the ViewController C's exit. Control dragging and selecting a method defines which ViewController to unwind to.
There's a lot of information in the WWDC video "Session 407 - Adopting Storyboards in your App."
Say you have two view controllers linked by a segue. Implement the following exit action on the first view controller:
Then, on Storyboard scene for the second view controller, Ctrl-drag from a UI element, such as a button, to the exit icon at the bottom of this view controller. The
done:
action you added to the code of the first controller will appear as an option. Now, activating the button you Ctrl-dragged to the exit icon will pop back to the first view controller and maintain its original state (ie UI elements such as text input supposedly still intact).