Class
ProgressIndicator
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.
Relationships
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
Name | Type | Description |
---|---|---|
style | Style |
The Style of |
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.
trackColor
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
Name | Type | Description |
---|---|---|
style | Style |
The Style of |