Member-only story

SwiftUI: How to make circular progress View?

How to make custom ProgressViewStyle? xcode 12 — ios 14

Prafulla Singh
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.

public let fractionCompleted: Double?
public var label: ProgressViewStyleConfiguration.Label?
public var currentValueLabel: ProgressViewStyleConfiguration.CurrentValueLabel? //will not need this
ProgressView(/*ProgressViewStyleConfiguration.Label*/, value: /*our binding*/, total: /*fractionCompleted - internally changes to 0-1 scale*)

UI Design:

--

--

Prafulla Singh
Prafulla Singh

Responses (1)