<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewController/allowedChildrenForUnwinding(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewController(im)allowedChildViewControllersForUnwindingFromSource:"
  },
  "title" : "allowedChildrenForUnwinding(from:)"
}
-->

# allowedChildrenForUnwinding(from:)

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

```
func allowedChildrenForUnwinding(from source: UIStoryboardUnwindSegueSource) -> [UIViewController]
```

## Parameters

`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.

## Discussion

UIKit calls this method when searching for the destination of an unwind segue. The default implementation returns the contents of the [`children`](/documentation/UIKit/UIViewController/children) property minus the view controller returned by the [`childContaining(_:)`](/documentation/UIKit/UIViewController/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)