---
title: "separateSecondaryViewController(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiviewcontroller/separatesecondaryviewcontroller(for:)"
---

# separateSecondaryViewController(for:)

Called when a split view controller transitions to a regular-width size class.

## Declaration

```swift
func separateSecondaryViewController(for splitViewController: UISplitViewController) -> UIViewController?
```

## Parameters

- `splitViewController`: The current split view controller.

## Return Value

Return Value The designated secondary view controller for the split view controller.

## Discussion

Discussion This method provides default behavior when you do not overwrite the splitViewController(_:separateSecondaryFrom:) method. The previous secondary view controller is returned.

## See Also

### Adapting to environment changes

- [collapseSecondaryViewController(_:for:)](uikit/uiviewcontroller/collapsesecondaryviewcontroller(_:for:).md)
