iPad SwiftUI layouts

Explore SwiftUI APIs, components, and modifiers with interactive iPad previews, Swift code, and Apple documentation.

TabView {
    TabSection("Foo") {
        Tab("1", systemImage: "1.circle") {
            Text("0")
        }
    }
    .defaultSectionExpansion(.collapsed)

    TabSection("Bar") {
        Tab("3", systemImage: "3.circle") {
            Text("2")
        }
    }

    TabSection("FooBar") {
        Tab("5", systemImage: "5.circle") {
            Text("4")
        }
    }
}
.tabViewStyle(.sidebarAdaptable)
iOS 27.0+ iPadOS 27.0+ macOS 27.0+ watchOS 27.0+ tvOS 27.0+ visionOS 27.0+

Every available iPad screenshot for Collapse Sidebar Sections by Default.

1 views