unwind(for:towards:)
Called when an unwind segue transitions to a new view controller.
Declaration
func unwind(for unwindSegue: UIStoryboardSegue, towards subsequentVC: UIViewController)Parameters
- unwindSegue:
The unwind segue being performed.
- subsequentVC:
The view controller closest to the current controller that represents the transition direction. Container view controllers should configure themselves so that this view controller is displayed.
Discussion
During the execution of an unwind segue, UIKit calls this method on any view controllers in the unwind path to give them an opportunity to reconfigure themselves. Container view controllers must implement this method and use to display the view controller in the subsequentVC parameter. For example, a tab bar controller selects the tab containing the specified view controller. Noncontainer view controllers should not override this method.