OPLGaugeView 0.2.0

OPLGaugeView 0.2.0

Gwinyai Nyatsoka 维护。



  • 作者:Gwinyai
  • Gwinyai

OPLGaugeView

一个使用 Swift 构建,可用来追踪速度的转速表。

gaugeview screenshot

安装

$pod install OPLGaugeView

或在你的 Podfile 中

pod 'OPLGaugeView'

或者在项目中包含 OPLGaugeView 和 OPLGaugeLayer 文件。

用法

使用 OPLGaugeView 继承 UIView 或在代码中实例化一个 OPLGaugeView。

配置

OPLGaugeView 允许您设置一些参数。

//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)

示例

包括一个示例项目,展示了如何使用 OPLGaugeView 和 Core Location 来获取行走或跑步的速度。

作者

戈文雅·纳亚斯卡 戈文雅

许可协议

本项目遵循MIT许可协议 - 更多详情请见许可协议