<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macCatalyst: 27.3.0 -",
    "tvOS: 27.3.0 -",
    "visionOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIBarContainerBehavior",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UIBarContainerBehavior"
  },
  "title" : "UIBarContainerBehavior"
}
-->

# UIBarContainerBehavior

Whether this navigation controller acts as a bar container, reading the bar
content of its child view controller and rendering that content in the
navigation controller’s own bar.

```
enum UIBarContainerBehavior
```

## Overview

For example, if there is a split view controller where one of the columns is a
view controller with multiple child `UINavigationController`s, set
`barContainerBehavior` to `.local` on all the children so that each one
renders its own bar, instead of their toolbar content being rendered in a
single toolbar managed by the split view controller.

Defaults to `.automatic`.

## Topics

### Enumeration Cases

[`case automatic`](/documentation/UIKit/UIBarContainerBehavior/automatic)

The system decides whether this navigation controller renders the
bar, or whether its bar content should be integrated into a single
bar in a parent container view controller, like a split view controller.

[`case local`](/documentation/UIKit/UIBarContainerBehavior/local)

This navigation controller reads the bar content of its child view
controllers and always renders a distinct, local bar.

### Initializers

[`init?(rawValue: Int)`](/documentation/UIKit/UIBarContainerBehavior/init(rawValue:))

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

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)