Skip to content

CircularProgressView

olejnjak edited this page Jan 9, 2023 · 2 revisions

CircularProgressView

Progress view that is in the shape of a circle

public final class CircularProgressView: UIView 

It draws itself within specified rect. The size is derived from the size of the rect where the smaller dimension (width / height) is used. The view itself is drawn in the middle of the rect. As a primary color is used tintColor of the view.

Inheritance

UIView

Properties

progress

Current progress

public var progress: CGFloat = 0 

This value should be in the range between 0 and 1. If the value is out of the range its automatically adjusted.

lineWidth

Line width of the circular progress view

public var lineWidth: CGFloat = 2

secondaryTintColor

Color applied on the background circle

public var secondaryTintColor 

Methods

draw(_:)

public override func draw(_ rect: CGRect)