allowedChildrenForUnwinding(from:)
Returns an array of child view controllers to search for an unwind segue destination.
Declaration
func allowedChildrenForUnwinding(from source: UIStoryboardUnwindSegueSource) -> [UIViewController]Parameters
- source:
The unwind segue source object containing information about the unwind segue.
Mentioned in
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.
Discussion
UIKit calls this method when searching for the destination of an unwind segue. The default implementation returns the contents of the children property minus the view controller returned by the childContaining(_:) 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.