---
title: "childContaining(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiviewcontroller/childcontaining(_:)"
---

# childContaining(_:)

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

## Declaration

```swift
func childContaining(_ source: UIStoryboardUnwindSegueSource) -> UIViewController?
```

## Parameters

- `source`: The unwind segue source object containing information about the unwind segue.

## Return Value

Return Value The view controller that contains the segue source.

## Discussion

Discussion Container view controllers call this method to identify the child view controller that is the source of the unwind segue. Typically, you call this method from your allowedChildrenForUnwinding(from:) method so that you can remove the corresponding view controller from the returned list of children.

## See Also

### Performing segues

- [shouldPerformSegue(withIdentifier:sender:)](uikit/uiviewcontroller/shouldperformsegue(withidentifier:sender:).md)
- [prepare(for:sender:)](uikit/uiviewcontroller/prepare(for:sender:).md)
- [performSegue(withIdentifier:sender:)](uikit/uiviewcontroller/performsegue(withidentifier:sender:).md)
- [allowedChildrenForUnwinding(from:)](uikit/uiviewcontroller/allowedchildrenforunwinding(from:).md)
- [canPerformUnwindSegueAction(_:from:sender:)](uikit/uiviewcontroller/canperformunwindsegueaction(_:from:sender:).md)
- [unwind(for:towards:)](uikit/uiviewcontroller/unwind(for:towards:).md)
