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

TabView

Creates Tabs with title, image, systemImage and custom Label.

Explore TabView on iPhone Duo in portrait and landscape across closed, partially open, and fully open states, 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")
    }
}
iOS 18.0+ iPadOS 18.0+ macOS 15.0+ watchOS 11.0+ tvOS 18.0+ visionOS 2.0+

Every available iPhone Duo screenshot for TabView.

6 views