ProgressView has no size option. Scale a spinner with .scaleEffect, control a bar's width with .frame(width:), and use a custom ProgressViewStyle to change a bar's height.
// Spinner
ProgressView()
.scaleEffect(1.8)
// Bar width
ProgressView(value: 0.6)
.frame(width: 200)
// Thicker bar with a custom style
struct ThickBar: ProgressViewStyle {
func makeBody(configuration: Configuration) -> some View {
let fraction = configuration.fractionCompleted ?? 0
GeometryReader { geo in
ZStack(alignment: .leading) {
Capsule().fill(.quaternary)
Capsule().fill(.tint).frame(width: geo.size.width * fraction)
}
}
.frame(height: 12)
}
}
ProgressView(value: 0.6).progressViewStyle(ThickBar())scaleEffect scales the drawn view without changing its layout size, so add padding if a scaled spinner overlaps its neighbors.
