PredixCircleProgressView

open class PredixCircleProgressView: UIView

Progress Circle View Shows progress as an arc within a circular display Can display two threshold lines, and change the progress color when the progress passes those thresholds Can display the percentage progress value as a centered title Can animate changes to the progress arc, the threshold color change, and title updates

  • Progress value, from 0 to 1

    Declaration

    Swift

    public var progress: CGFloat = 0.0
  • Controls whether or not the title text will show within the progress circle.

    Declaration

    Swift

    public var isTitleHidden: Bool
  • Controls whether or not the title text will animate with progress display.

    Declaration

    Swift

    public var isTitleAnimated: Bool = true
  • Format string for the title text

    Declaration

    Swift

    public var titleFormat: String = "%.0f%%"
  • Value to multiply the progress value by before formatting for the title display

    Declaration

    Swift

    public var titleProgessMultiplier: CGFloat = 100.0
  • Color used for the incomplete portion of the progress display

    Declaration

    Swift

    public var circleColor: UIColor = UIColor.gray
  • Progress circle color

    Declaration

    Swift

    public var progressColor: UIColor = UIColor.green
  • Warning threshold color

    Declaration

    Swift

    public var warningThresholdColor: UIColor = UIColor.orange
  • Critical threshold color

    Declaration

    Swift

    public var criticalThresholdColor: UIColor = UIColor.red
  • When true, the color of the progress circle will change to match the crossed threshold

    Declaration

    Swift

    public var thresholdColorMatching: Bool = true
  • Warning threshold Set to zero to disable warning thresholds

    Declaration

    Swift

    public var warningThreshold: CGFloat = 0.00
  • Critical threshold Set to zero to disable critical thresholds

    Declaration

    Swift

    public var criticalThreshold: CGFloat = 0.00
  • Length of the threshhold lines Set to zero to disable visible threshold lines

    Declaration

    Swift

    public var thresholdLineLength: CGFloat = 20
  • Witdh of the threshhold lines

    Declaration

    Swift

    public var thresholdLineWidth: CGFloat = 1.0
  • Factor to scale the title text relative to the progress circle size

    Declaration

    Swift

    public var titleScaleFactor: CGFloat = 0.4
  • Line width of the progress circle

    Declaration

    Swift

    public var progressLineWidth: CGFloat = 10.0
  • Line width of the incomplete circle

    Declaration

    Swift

    public var circleLineWidth: CGFloat = 10.0
  • Draw the progress arc counterclockwise rather than clockwise Defaults to false, which uses a clockwise arc.

    Declaration

    Swift

    public var counterClockwise: Bool = false
  • Consider thresholds minimums rather than maximums. If true then thresholds are crossed when the progress is below the threshold Defaults to false, thresholds are crossed when the progress is above the threshold

    Declaration

    Swift

    public var invertThresholds: Bool = false
  • Total duration used to animate progress from 0 to 100%. Actual duration of progress animation will be dependant on the value change.

    Declaration

    Swift

    public var progressAnimationDuration: CFTimeInterval = 1.5
  • Title Label

    Declaration

    Swift

    public var title: UILabel!
  • Cancels the current progress update animation, if running

    Declaration

    Swift

    open func cancelAnimation()
  • Returns true if the progress animation is currently running

    Declaration

    Swift

    open func isAnimating() -> Bool
  • Change the progress property to the provided value, and animate the circle from the current value to the provided value.

    Declaration

    Swift

    open func animateProgress(to value: CGFloat)

    Parameters

    value

    Value to set the progress property.

  • Updates the title text to the given value, using the titleFormat and the titleProgessMultiplier

    Declaration

    Swift

    open func updateTitle(to value: CGFloat)

    Parameters

    value

    Value, usually matching the progress property to set the title text