<!--
{
  "availability" : [
    "iOS: 27.1.0 -",
    "iPadOS: 27.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewController/preferredVerticalBarBehavior",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewController(py)preferredVerticalBarBehavior"
  },
  "title" : "preferredVerticalBarBehavior"
}
-->

# preferredVerticalBarBehavior

The vertical bar behavior that this view controller prefers.

```
var preferredVerticalBarBehavior: UIVerticalBarBehavior { get }
```

## Discussion

Override this property to opt out of the vertical bar. Return
`UIVerticalBarBehaviorDisabled` to hide the vertical bar. Defaults to
`UIVerticalBarBehaviorAutomatic`.

Disable the vertical bar only for UIs that are better served by
horizontal bars, such as a fullscreen video player with toolbar
controls or a non-scrolling layout like a calculator. Treat it as a
stable choice: avoid changing it frequently as the user navigates, and
don’t toggle it for a single view controller as a function of that
view’s state. To hide the bars and status bar on a given screen rather
than change the layout, use the visibility APIs instead.

When the resolved configuration changes, the system animates the
transition: content reflows to or from the horizontal bars while the
status bar changes axis and the leading or trailing safe area inset for
the vertical bar is added or removed.

---

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)