iPhone Duo SwiftUI examples
Explore SwiftUI APIs, components, and modifiers on iPhone Duo. Compare portrait and landscape layouts in closed, partially open, and fully open states, with Swift code and Apple documentation.
TabView
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.
Explore Default Tab Bar Placement on iPhone Duo in portrait and landscape across closed, partially open, and fully open states, with SwiftUI code and Apple API documentation.
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)Compatibility
Tags
Found an issue or have a suggestion?
All variants
Every available iPhone Duo screenshot for Default Tab Bar Placement.