TZSpeedometer
TZSpeedometer lets you display the meter with both positive & negative readings. It also supports marking to be shown inside or outside the gauge/meter. Highly customizable and easy to use.
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
- Swift 4.2 and above
- iOS 11 and above
Installation
TZSpeedometer is available through CocoaPods. To install
it, simply add the following line to your Podfile:
For Carthage, Add this to Cartfile
Usage
Please check code in Example Project to see how you can customize the TZSpeedometer.
For creating a new TZSpeedometer
You can also customize the UI of the TZSpeedometer using : MeterAppearance
. Some of the examples are below
You can also customize the maximum and minimum reading of the meter and provide scale delta using Meter
.
Also, keep in mind, to use the delta which will divide the meter marking in a way that maximum and minimum reading are visible on the meter. Make sure (maximumReading - minimumReading) / scaleDelta
is Int.
(NOTE: unit Text label is not shown in the screenshot below. please check Example project for more options.)
Simply Set the reading on the meter.