Instance Method


Returns an array of child view controllers to search for an unwind segue destination.


- (NSArray<UIViewController *> *)allowedChildViewControllersForUnwindingFromSource:(UIStoryboardUnwindSegueSource *)source;



The unwind segue source object containing information about the unwind segue.

Return Value

An array of view controllers representing the child view controllers to search. The order of the items in the array determines the search order.


UIKit calls this method when searching for the destination of an unwind segue. The default implementation returns the contents of the childViewControllers property minus the view controller returned by the childViewControllerContainingSegueSource: method. You can override this method as needed in your custom container view controllers to change the search order. For example, a navigation controller reverses the order so that the search starts with the view controller at the top of the navigation stack.

See Also

Performing Segues

- shouldPerformSegueWithIdentifier:sender:

Determines whether the segue with the specified identifier should be performed.

- prepareForSegue:sender:

Notifies the view controller that a segue is about to be performed.

- performSegueWithIdentifier:sender:

Initiates the segue with the specified identifier from the current view controller'€™s storyboard file.

- childViewControllerContainingSegueSource:

Returns the child view controller that contains the source of the unwind segue.

- canPerformUnwindSegueAction:fromViewController:sender:

Called on a view controller to determine whether it responds to an unwind action.

- unwindForSegue:towardsViewController:

Called when an unwind segue transitions to a new view controller.