Skip to content

Commit fd3d1df

Browse files
committed
Show progress labels and styles in the playground
1 parent 2ab91c9 commit fd3d1df

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎Demo/App.swiftpm/Sources/ControlPlaygrounds.swift‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,22 @@ struct ProgressViewPlayground: View {
193193
Button("Advance") { progress = progress >= 1 ? 0 : progress + 0.25 }
194194
}
195195
}
196+
Example("With a label") {
197+
VStack(alignment: .leading, spacing: 12) {
198+
ProgressView("Loading…")
199+
ProgressView("Copying files", value: progress)
200+
}
201+
}
202+
Example("progressViewStyle") {
203+
VStack(alignment: .leading, spacing: 12) {
204+
// determinate, but drawn as a ring
205+
ProgressView(value: progress)
206+
.progressViewStyle(.circular)
207+
// indeterminate, but drawn as a bar
208+
ProgressView()
209+
.progressViewStyle(.linear)
210+
}
211+
}
196212
}
197213
}
198214
}

0 commit comments

Comments
 (0)