struct ProgressViewStyleConfiguration
The properties of a progress view instance.
Availability 有効性
Technology
init(_ configuration: ProgressViewStyleConfiguration
) where Label == ProgressViewStyleConfiguration
.Label
, CurrentValueLabel == ProgressViewStyleConfiguration
.CurrentValueLabel
Label
conforms to View
and CurrentValueLabel
conforms to View
.You can use this initializer within the make
method of a Progress
to create an instance of the styled progress view. This is useful for custom progress view styles that only modify the current progress view style, as opposed to implementing a brand new style.
For example, the following style adds a dark blue shadow to the progress view, but otherwise preserves the progress view’s current style:
struct DarkBlueShadowProgressViewStyle: ProgressViewStyle {
func makeBody(configuration: Configuration) -> some View {
ProgressView(configuration)
.shadow(color: Color(red: 0, green: 0, blue: 0.6),
radius: 4.0, x: 1.0, y: 2.0)
}
}
struct ProgressViewStyleConfiguration