<!--
{
  "availability" : [
    "iOS: 2.0.0 - 8.0.0",
    "iPadOS: 2.0.0 - 8.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISplitViewControllerDelegate/splitViewController(_:willShow:invalidating:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UISplitViewControllerDelegate(im)splitViewController:willShowViewController:invalidatingBarButtonItem:"
  },
  "title" : "splitViewController(_:willShow:invalidating:)"
}
-->

# splitViewController(_:willShow:invalidating:)

Tells the delegate that the specified view controller is about to be shown again.

```
optional func splitViewController(_ svc: UISplitViewController, willShow aViewController: UIViewController, invalidating barButtonItem: UIBarButtonItem)
```

## Parameters

`svc`

The split view controller that owns the specified view controller.

`aViewController`

The view controller being hidden.

`barButtonItem`

The button used to display the view controller while it was hidden.

## Discussion

When the view controller rotates from a portrait to landscape orientation, it shows its hidden view controller once more. If you added the specified button to your toolbar to facilitate the display of the hidden view controller in a popover, you must implement this method and use it to remove that button.

---

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)