CreationKit Documentation

Class Progress​Indicator

public class ProgressIndicator: UIControl  

ProgressIndicators express an unspecified wait time or display the length of a process.

Prefer to use make(style:) instead of init(style:).

ProgressIndicators can have one of two styles:

  • linear - displayed as a line

  • circular - displayed as a circle

For an indeterminate progress indicator—or, informally, a "spinner"—use an instance of the ActivityIndicator class.

AutoLayout & Constraints

The design system specifies the heights and optionally the width of this type. When using a linear style, the height will be constrained to 4 points, where as the circular style will constrain the height and width to 40 points.

DO NOT place any constraints that may conflict with these constraints.

ProgressIndicator ProgressIndicator UIControl UIControl ProgressIndicator->UIControl

Nested Types

ProgressIndicator.Style

The styles ProgressIndicator supports.

Conforms To

UIControl

Initializers

init(style:​)

public init(style: Style)  

Creates a new ProgressIndicator with a specified style. Prefer to use make(style:) instead.

For an indeterminate progress indicator—or, informally, a "spinner"—use an instance of the ActivityIndicator class.

Parameters

style Style

The Style of ProgressIndicator you want, linear or circular.

Properties

progress

public var progress: Float  

The current progress shown by the receiver.

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.

tint​Color

public override var tintColor: UIColor!  

The color of the view progress indicator.

track​Color

public var trackColor: UIColor = ColorManager.shared.progressIndicatorTrack  

The color of the track the progress indicator follows.

Methods

make(style:​)

public static func make(style: Style) -> ProgressIndicator  

Creates a new ProgressIndicator with a specified style.

For an indeterminate progress indicator—or, informally, a "spinner"—use an instance of the ActivityIndicator class.

Parameters

style Style

The Style of ProgressIndicator you want, linear or circular.