Skip to content

Commit

Permalink
ProgressView sample
Browse files Browse the repository at this point in the history
  • Loading branch information
TahaTesser committed Oct 3, 2024
1 parent a325f56 commit b95f89b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Binary file not shown.
1 change: 1 addition & 0 deletions SwiftUIPlayground/Samples.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public let samples: [String: AnyView] = [
[
"Stepper": AnyView(StepperSample()),
"ColorPicker": AnyView(ColorPickerSample()),
"ProgressView": AnyView(ProgressViewSample()),
]
)),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// ProgressViewSample.swift
// SwiftUIPlayground
//
// Created by Taha Tesser on 03.10.2024.
//

import SwiftUI

struct ProgressViewSample: View {
@State private var progress = 0.5

var body: some View {
VStack {
ProgressView()
ProgressView(value: progress)
Button("More") { progress += 0.05 }
}
.padding()
}
}

#Preview {
ProgressViewSample()
}

0 comments on commit b95f89b

Please sign in to comment.