<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISplitViewController/show(_:sender:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISplitViewController(im)showViewController:sender:"
  },
  "title" : "show(_:sender:)"
}
-->

# show(_:sender:)

Presents the specified view controller as the primary view controller in the split view interface.

```
func show(_ vc: UIViewController, sender: Any?)
```

## Parameters

`vc`

The view controller to display in the primary location of the split view interface.

`sender`

The object that made the request to show the view controller.

## Discussion

Whenever possible, use this method (instead of modifying the contents of the [`viewControllers`](/documentation/UIKit/UISplitViewController/viewControllers) property directly) to replace the primary view controller of your split view interface. This method displays the specified view controller in a way that’s optimal for the current size class in effect.

Typically, you call this method from an action method when you want to replace the primary view controller with the one specified in `vc`. This method calls the split view controller delegate’s [`splitViewController(_:show:sender:)`](/documentation/UIKit/UISplitViewControllerDelegate/splitViewController(_:show:sender:)) method to give the delegate an opportunity to show the view controller. If the delegate does not show the view controller, the split view controller shows it using the following heuristics:

- In a horizontally regular environment, the split view controller installs `vc` as the primary view controller unless `vc` is already a child of the primary view controller. In that case, it installs `vc` as the secondary view controller.
- In a horizontally compact environment, the split view controller presents `vc` modally.

---

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)