SFGaugeView 0.0.7

SFGaugeView 0.0.7

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最后发布2014 年 12 月

Thomas Winkler 维护。



  • 作者:
  • Thomas Winkler

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.

Alt text

设置

使用 CocoaPods 安装

如果您对 CocoaPods 不熟悉,可以在此处查看教程 这里

  1. 在终端导航到您的项目根目录。
  2. 运行 'touch Podfile' 来创建 Podfile。
  3. 使用 'open -e Podfile' 打开 Podfile。
  4. 将 pod SFGaugeView 添加到您的 Podfile 中。

    platform :ios, '7.0'
    pod 'SFGaugeView'
    
  5. 运行 pod install

  6. 打开您应用的 .xcworkspace 文件以启动 Xcode 并开始使用控件!

用法

  1. 通过从故事板拖放 UIView 并更改实现类,或通过编程方式创建 SFGaugeView
  2. 创建出口(如果通过故事板创建)
  3. 设置参数

    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)
    
  4. 仪表控制交互 currentLevel = 返回当前级别

代理方法

    - (void) sfGaugeView:(SFGaugeView*) gaugeView didChangeLevel:(NSInteger) level;

作者

Simpliflow GmbH

Thomas Winkler

许可证

在 MIT 许可证下分发。