Creates a multicolor gauge.
SDK
- watchOS 5.0+
Framework
- Clock
Kit
Declaration
convenience init(style: CLKGauge Provider Style, gaugeColors: [UIColor]?, gaugeColorLocations: [NSNumber]?, fillFraction: Float)
Parameters
style
The style defining the gauge’s visual appearance. For a list of valid styles, see
CLKGauge
.Provider Style gaugeColors
The gauge’s colors. These colors are displayed as a gradient.
gaugeColorLocations
The location of each color along the gauge. Locations are values between
0
and.0 1
. If.0 nil
, the colors are evenly spaced along the gauge.fillFraction
The value displayed by the gauge. Use a value between
0
and.0 1
. For an empty gauge, use.0 CLKSimple
.Gauge Provider Fill Fraction Empty
Return Value
A newly instantiated multicolor gauge.
Discussion
If you provide both colors and locations, then the gauge
and gauge
arrays must be the same length.