A segue will not only help you to go to other screens via push or show (present modally or popover), it can help you to return to your source view controller. The unwind segue will be used to go back to your source view controller not only from the pushed view controller or presented view controller, you can also go back multiple steps in the navigation hierarchy. For example, in the previous demo we built, we have the first view controller, which can be pushed to RedViewController. The RedViewController can be pushed to BlueViewController. We can create the unwind segue, which will help RVC, BVC to go back directly to FVC. I know it's still not clear, and so now, we will do it together to stick this in your mind: ...
Unwind segues (exit segues)
Get iOS Programming Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.