How to implement Unwind Segue

Posted By : Manu Gupta | 11-May-2016

Unwind segue is used to navigate back through push/popover/modal segues. It is also known as exit segue and the major advantage of unwind segue is that we can navigate back multiple push/popover/modal segues with a single unwind action.

 

You can pop/dismiss multiple controllers with single unwind action.

 

 

Now for that we have to add action to the controller where you want to unwind the segue.

 

 

                        @IBAction func unwindToVC(segue: UIStoryboardSegue) {   
                    print("Inside unwind segue")
                }

 

Now after that add the action to unwind segue from whichever controller you want to unwind the segue

 

You are good to go with the unwind segue and you can even get the project from Github

 

Thanks !

 

 

About Author

Author Image
Manu Gupta

Manu is a Native iOS (Swift) and Titanium lead developer . Manu has good experience working with Swift and Alloy framework as well. He loves watching movies and travelling.

Request for Proposal

Name is required

Comment is required

Sending message..