UIKit · property
preferredVerticalBarBehavior
Controls whether navigation, toolbar and tab bar controls move into iPhone Duo's shared vertical region, or stay horizontal.
On the outer display, and on the inner display in landscape, iPhone Duo moves navigation, toolbar and tab bar controls into one shared vertical region down the side. The inner display in portrait keeps horizontal bars.
This property is how you influence that.
The values
// UIKit
navigationItem.preferredVerticalBarBehavior = .verticalPreferred
navigationItem.preferredVerticalBarBehavior = .horizontalOnly
// SwiftUI
.toolbarVerticalBehavior(.disabled)
axisBehavior carries the same idea in SwiftUI’s own vocabulary, with
.verticalPreferred and .horizontalOnly.
Related symbols
verticalBarEdge/toolbarVerticalEdge— which side the vertical region sits on.visibilityPriority— which items survive when space runs out.ToolbarOverflowMenu— where the rest go.
Two things that catch people
Only the detail column participates. Inside a split view, the vertical bar applies to the detail column, not the whole interface.
Custom bar content is not considered. If you put your own view in a
UIToolbar, the system does not lay it out vertically for you. That is the
most common reason a toolbar renders sideways or clipped.
Opting out is a decision, not a default
.horizontalOnly and .disabled exist, and they are the right answer for some
interfaces. They are the wrong answer as a way to avoid doing the work —
the bar stays horizontal on a display whose shape expects otherwise.
Doing the work
This page describes the symbol. For the task, see prepare your toolbars for vertical layout.