Swiftpack.co - Ryu0118/SRCircleProgress as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Ryu0118.
Ryu0118/SRCircleProgress 0.2.1
Customizable circle progress bar written in Swift.
⭐️ 1
🕓 2 weeks ago
.package(url: "https://github.com/Ryu0118/SRCircleProgress.git", from: "0.2.1")


Release CocoaPods Version Carthage compatible Swift Compatibility Platform Compatibility License Twitter

Customizable circle progress bar written in Swift.



  • iOS13.0+


SRCircleProgress is available through CocoaPods. To install it, add the following to your Podfile:

pod 'SRCircleProgress'

Swift Package Manager

SRCircleProgress is also available through Swift Package Manager. Add SRCircleProgress as a dependency to your Package.swift:

.package(url: "https://github.com/Ryu0118/SRCircleProgress", from: "0.2.1")


The basic usage is as follows.

let circleProgressView = SRCircleProgress(frame: .zero)
circleProgressView.translatesAutoresizingMaskIntoConstraints = false

    circleProgressView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
    circleProgressView.centerYAnchor.constraint(equalTo: view.centerYAnchor),
    circleProgressView.widthAnchor.constraint(equalToConstant: 150),
    circleProgressView.heightAnchor.constraint(equalToConstant: 150),

To set the progress on the progress bar,

circleProgressView.setProgress(0.5, animated: true)

The current progress is represented by a floating-point value between 0.0 and 1.0, inclusive, where 1.0 indicates the completion of the task. The default value is 0.0. Values less than 0.0 and greater than 1.0 are pinned to those limits.


circleProgressView.progress = 0.6 // Set the progress without animation.
circleProgressView.isReverse = false // Reverse the direction of the color to be filled.
circleProgressView.percent = 60 // Set the percent without animation
circleProgressView.progressLineColor = .systemBlue // The color shown for the portion of the progress view that is filled.
circleProgressView.progressLineWidth = 6 // Specifies the line width of the progress view.
circleProgressView.backgroundLineWidth = 12 // Specifies the line width of the view behind the progress view.
circleProgressView.animationDuration = 0.2 // Specifies the duration of the animation when setProgress(_:animated:) is executed
circleProgressView.progressAngle = .lowerLeftToLowerRight(offset: 0) // Change the shape of the progress view

To change the shape of the progress view, use the progressAngle property. Possible values for progressAngle are as follows

enum ProgressAngle {
    case topToTop
    case bottomToBottom
    case lowerLeftToLowerRight(offset: Double = 0)
    case leftToRight(offset: Double = 0)
topToTop bottomToBottom
topToTop bottomToBottom
leftToRight(offset = 0) lowerLeftToLowerRight(offset = 0)
leftToRight lowerLeftToLowerRight


Stars: 1
Last commit: 5 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

2 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics