iPhone SwiftUI layouts

Explore SwiftUI APIs, components, and modifiers with interactive iPhone previews, Swift code, and Apple documentation. Compare every available orientation, appearance, and design.

ProgressView

ProgressView

The different ProgressView initializers

Explore ProgressView on iPhone in portrait, with SwiftUI code and Apple API documentation.

let workoutDateRange = Date()...Date().addingTimeInterval(5*60)

var body: some View {
    VStack {
        HStack(alignment: .top) {
            ProgressView()
            ProgressView("Foo")
        }
        HStack(alignment: .top) {
            ProgressView(value: 0.42)
                .padding(.top)
            ProgressView(value: 42, total: 100)
                .padding(.vertical)
        }
        ProgressView(timerInterval: 0.42)
            .padding(.bottom)
        ProgressView(value: 0.42) {
            Text("Foo")
        } currentValueLabel: {
            Text("bar")
        }
    }
}
iOS 14.0+ iPadOS 14.0+ macOS 11.0+ watchOS 7.0+ tvOS 14.0+ visionOS 1.0+

Every available iPhone screenshot for ProgressView.

2 views