LMGaugeView 1.0.5

LMGaugeView 1.0.5

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最新发布2019年6月

LMinh 维护。



  • LMinh

LMGaugeView

LMGaugeView 是一个受 Dribbble 上的 Flavor sketch 和 Dribbble 启发而创建的简单且可定制的 iOS 仪表控件。

               

功能

  • 显示仪表,例如速度计或加载指示器。
  • 使用 Core Graphics 和 Core Animation。
  • 允许进行大量定制。
  • 支持 Interface Builder 设计器。

要求

  • iOS 7.0 或更高版本
  • ARC

安装

从 CocoaPods 导入

pod 'LMGaugeView'

手动导入

  • LMGaugeView 文件夹拖放到你的项目中。
  • 在将使用此库的类顶部添加 #import "LMGaugeView.h"

使用方法

您可以通过几行代码轻松集成 LMGaugeView。以下是一个示例。

LMGaugeView *gaugeView = [[LMGaugeView alloc] initWithFrame:frame];
gaugeView.value = 40;
[self.view addSubview:gaugeView];

定制

您可以自定义 LMGaugeView 的以下属性

@property (nonatomic, assign) CGFloat minValue;
@property (nonatomic, assign) CGFloat maxValue;
@property (nonatomic, assign) CGFloat limitValue;
@property (nonatomic, assign) NSUInteger numOfDivisions;
@property (nonatomic, assign) NSUInteger numOfSubDivisions;
@property (nonatomic, assign) CGFloat ringThickness;
@property (nonatomic, strong) UIColor *ringBackgroundColor;
@property (nonatomic, assign) CGFloat divisionsRadius;
@property (nonatomic, strong) UIColor *divisionsColor;
@property (nonatomic, assign) CGFloat divisionsPadding;
@property (nonatomic, assign) CGFloat subDivisionsRadius;
@property (nonatomic, strong) UIColor *subDivisionsColor;
@property (nonatomic, assign) BOOL showLimitDot;
@property (nonatomic, assign) CGFloat limitDotRadius;
@property (nonatomic, strong) UIColor *limitDotColor;
@property (nonatomic, strong) UIFont *valueFont;
@property (nonatomic, strong) UIColor *valueTextColor;
@property (nonatomic, assign) BOOL showUnitOfMeasurement;
@property (nonatomic, copy)   NSString *unitOfMeasurement;
@property (nonatomic, strong) UIFont *unitOfMeasurementFont;
@property (nonatomic, strong) UIColor *unitOfMeasurementTextColor;

(请参考/LMGaugeViewDemo 目录中的示例 Xcode 项目)

许可证

LMGaugeView 依据 MIT 许可协议授权。

联系方式

Minh Luong Nguyen

使用 LMGaugeView 的项目

请随意在这里添加您使用LMGaugeView的项目此处

Android版本

感谢Sorbh为制作KdGaugeView

捐赠

paypal