Member-only story
SwiftUI: How to make circular progress View?
How to make custom ProgressViewStyle? xcode 12 — ios 14
2 min readOct 6, 2020
In this tutorial, We are going to implement ProgressViewStyle for circular progress bar. But before we implement
What is View styles and How to use it?
Covered here:
Now Considering you have basic understanding of View Style. Lets let started with logic.
- Check what is available for use in ProgressViewStyleConfiguration (this the the configuration model, we will read for data)
public let fractionCompleted: Double?
public var label: ProgressViewStyleConfiguration.Label?
public var currentValueLabel: ProgressViewStyleConfiguration.CurrentValueLabel? //will not need this
- Map ProgressViewStyleConfiguration Progress view Init Method.
ProgressView(/*ProgressViewStyleConfiguration.Label*/, value: /*our binding*/, total: /*fractionCompleted - internally changes to 0-1 scale*)