Contents

segueForUnwinding(to:from:identifier:)

Called when an unwind segue action needs to transition between two view controllers.

Declaration

func segueForUnwinding(to toViewController: UIViewController, from fromViewController: UIViewController, identifier: String?) -> UIStoryboardSegue?

Parameters

  • toViewController:

    The target view controller.

  • fromViewController:

    The view controller initiating the unwind action.

  • identifier:

    An identifier for the segue.

Return Value

A segue object for managing the transitions between the two view controllers.

Discussion

If you implement a custom container view controller that also uses segue unwinding, you must override this method. In your custom implementation, instantiate and return a segue object that performs whatever animation and other steps that are necessary to unwind the view controllers.

You do not need to override this method for view controllers that are not containers.

See Also

Deprecated methods