- Xcode 11+
- Swift 5
- iOS 10.0+
pod 'MeterGauge', :git => 'git@github.com:boof-tech/MeterGauge.git', :tag => '0.0.5'
import MeterGauge
var gaugeView: MeterGauge = MeterGauge(frame: view.bounds)
let color = UIColor(red: 0.3, green: 0.5, blue: 0.2, alpha: 1.0)
let segment = Segment(percent: 100, color: color, status: "")
guageView.segments.append(segment)
gaugeView.set(value : Int)
- Value
gaugeView.valueFont = UIFont.systemFont(ofSize: 28, weight: .heavy)
gaugeView.valueTextColor = UIColor.black
- Description
gaugeView.descriptionFont = UIFont.systemFont(ofSize: 28, weight: .heavy)
gaugeView.descriptionTextColor = UIColor.black
- Center Circle
gaugeView.centerCircleBackgroundColor = UIColor.clear
gaugeView.centerCircleBorderWidth = 3.0
- Ticks
gaugeView.tickWidth = 7.0
gaugeView.beforeIndicatorTickOpacity = 1.0
gaugeView.afterIndicatorTickOpacity = 0.3
- Indicator Tick Width
gaugeView.indicatorTickHeight = 10.0
gaugeView.indicatorTickScale = 1.0
gaugeView.indicatorTickOpacity = 1.0
Meter Gauge is available under the MIT license. See the LICENSE.txt file for more info.