A speedomter built with Swift that can be used to track the speed of travel. This project is taken directly from the course iOS 12 & Swift 4 - App Design, UI/UX and Development. If you would like to learn more about how to build custom UI components please refer to the course.
$pod install OPLGaugeView
or in your Podfile
pod 'OPLGaugeView'
or include the files OPLGaugeView and OPLGaugeLayer in your project.
Subclass a UIView with OPLGaugeView or instantiate an OPLGaugeView in code.
OPLGaugeView allows you to set some parameters.
//Add spring animation to gauge rotation
self.gaugeView.enableSpring = true
//Disable spring animtion from gauge rotation
self.gaugeView.enableSpring = false
//rotate the gauge to a new speed
let speed: CGFloat = 25
self.gaugeView.rotateGauge(newSpeed: 25)
An example project is included which shows how to use OPLGaugeView with Core Location to get the speed of walking or running.
Gwinyai Nyatsoka Gwinyai
This project is licensed under the MIT License - see LICENSE for more details