iPad SwiftUI layouts

Explore SwiftUI APIs, components, and modifiers with interactive iPad previews, 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 iPad in portrait and landscape, with SwiftUI code and Apple API documentation.

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)
iOS 27.0+ iPadOS 27.0+ macOS 27.0+ watchOS 27.00+ tvOS 27.0+ visionOS 27.0+

Every available iPad screenshot for Default Tab Bar Placement.

2 views