A custom UIView with a gauge control (tachometer like control). Detects swipe gesture and sets the needle/level appropriately. You can customize colors, the maximum level, min/max images, etc.
使用 CocoaPods 安装
如果您对 CocoaPods 不熟悉,可以在此处查看教程 这里。
将 pod SFGaugeView
添加到您的 Podfile 中。
platform :ios, '7.0'
pod 'SFGaugeView'
运行 pod install
。
.xcworkspace
文件以启动 Xcode 并开始使用控件!设置参数
maxlevel = The maximum level of gauge control (unsigned int value)
minlevel = The minimum level of gauge control (unsigned int value)
needleColor = Color of needle
bgColor = Background Color of gauge control
hideLevel = If set to YES the current level is hidden
minImage = An image for min level (see screenshot)
maxImage = An image for max level (see screenshot)
currentLevel = Sets the current Level
autoAdjustImageColors = Overlays the images with needleColor (default: NO)
仪表控制交互 currentLevel = 返回当前级别
- (void) sfGaugeView:(SFGaugeView*) gaugeView didChangeLevel:(NSInteger) level;
在 MIT 许可证下分发。