Default Tab Bar Placement
Specifies the preferred placement for the tabs of a TabView in the sidebarAdaptable style on platforms where the tab bar cannot adapt between different representations, and only one representation can be shown. For example, on iOS, it can enforce the sidebar on large-screen devices like the Pro Max, and iPhone Duo. This modifier has no effect on iPadOS.
Platform Compatibility
Tags
SwiftUI Code
TabView {
Tab {
Text("0")
}
Tab("1", systemImage: "1.circle") {
Text("1")
}
Tab("2", image: "cats24x24") {
Text("2")
}
Tab {
Text("3")
} label: {
Label("3", systemImage: "3.circle")
}
}
.tabViewStyle(.sidebarAdaptable)
.defaultTabBarPlacement(.sidebar)Found an issue or have a suggestion?
More TabView Components
View allDefault Collapsed Tab Section
Sets the default expansion state for the section containing this tab to collapsed when displayed in the sidebar.
Tab View Customization Behavior
Configures the customization behavior of customizable tab view content.
Tab View Customization
Specifies the customizations to apply to the sidebar representation of the tab view.
Default Adaptable Tab Bar Placement
Specifies the default placement for the tabs in a tab view using the adaptable sidebar style.
Explore Other Components
Browse allAccessoryCircularGaugeStyle
A gauge style that displays an open ring with a marker that appears at a point along the ring to indicate the gauge’s current value
MenuControlGroupStyle
A control group style that presents its content as a menu when the user presses the control, or as a submenu when nested within a larger menu
Current Value Gauge
Creates a gauge showing a value within a range and that describes the gauge’s purpose and current value
UIKit Separator Colors
The UIKit separator colors that are also used in other components, such as the TextField