Structure¶
DefaultProgressViewStyle¶
The default progress view style in the current context of the view being styled.¶
Declaration¶
struct DefaultProgressViewStyle : ProgressViewStyle
Overview¶
Use this style to specify the default style for a ProgressView. The style depends on the type of progress view that is being initialized. For example:
struct ContentView: View {
var body: some View {
ProgressView()
.progressViewStyle(DefaultProgressViewStyle())
}
}

In this instance, the style displays a spinner. However, if we initialize the ProgressView using init(value:total:) instead, we get a different look:
struct ContentView: View {
var body: some View {
ProgressView(value: 5, total: 10)
.progressViewStyle(DefaultProgressViewStyle())
}
}

- Note: This style does not need to be specified explicitly unless you would like to override a style from higher up in the view hierarchy. This style is used if no others are specified.
Availability¶
iOS 14.0+
macOS 11.0+
tvOS 14.0+
watchOS 7.0+
Topics¶
Instance Method¶
makeBody(configuration:) Creates a view representing the body of a progress view.
Initializer¶
init() Creates a default progress view style.
Type Alias¶
Body A view representing the body of a progress view.