Reputation: 645
I have a good understanding how to work with Storyboard, Segues and Unwind-Segues on iOS. For porting my App to OS X I need to rewrite the UI and want to do this with the OS X storyboards. However the Unwinding-Mechanism from iOS seems not be the same like in iOS. How to Unwind a ViewController-Scene on Mac OS X. Where is that "Exit"-Button in the ViewController ?
Upvotes: 3
Views: 2647
Reputation: 1129
Unlike iOS where the screen is the real estate. In Mac, we have plenty of space. You see, from the builtin segues, most of them are just a way to show up a new dialog. And, when you are done with it. You don't really need to go back somewhere, all you need is a way to close that dialog down.
To decoupling things a bit further, instead of unwinding which require selector from other view controller. They encourage us to use dismissController:
from the view controller we want to close it down. This method will dismiss the view controller using the same segue animator that presented it.
-(IBAction)backDidTap:(id)sender {
[self dismissController: nil];
}
In other words, this is one step unwinding.
Upvotes: 3