Skip to content

Latest commit

 

History

History
54 lines (31 loc) · 1.32 KB

README.md

File metadata and controls

54 lines (31 loc) · 1.32 KB

OPLGaugeView

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.

gaugeview screenshot

Installing

$pod install OPLGaugeView

or in your Podfile

pod 'OPLGaugeView'

or include the files OPLGaugeView and OPLGaugeLayer in your project.

Usage

Subclass a UIView with OPLGaugeView or instantiate an OPLGaugeView in code.

Config

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)

Example

An example project is included which shows how to use OPLGaugeView with Core Location to get the speed of walking or running.

Author

Gwinyai Nyatsoka Gwinyai

LICENSE

This project is licensed under the MIT License - see LICENSE for more details