CATCurveProgressView 1.0.1

CATCurveProgressView 1.0.1

测试测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2016年6月

CatchZeng 维护。



  • 作者:
  • CatchZeng

iOS 自定义曲线(圆形、弧形、圆形)进度视图,支持渐变颜色、任意角度、IBDesignable & IBInspectable 等。

效果

Effect

安装

注意:请记住添加 use_frameworks!

use_frameworks!

pod 'CATCurveProgressView'

用法

您可以在代码中或 xib 中初始化 CATCurveProgressView。

Effect

更改进度

_progressView1.progress = 0.9f;
//or
[_progressView1 setProgress:0.9f animated:YES];

自定义

//Curve background color
@property (nonatomic, strong) IBInspectable UIColor *curveBgColor;

//Enable gradient effect
@property (nonatomic, assign) IBInspectable CGFloat enableGradient;

//Gradient layer1[you can custom gradient effect by set gradient layer1's property]
@property (nonatomic, strong ,readonly) CAGradientLayer *gradientLayer1;

//Gradient layer2[you can custom gradient effect by set gradient layer2's property]
@property (nonatomic, strong ,readonly) CAGradientLayer *gradientLayer2;

//Progress color when gradient effect is disable [!!!do no use clearColor]
@property (nonatomic, strong) IBInspectable UIColor *progressColor;

//Progress line width
@property (nonatomic, assign) IBInspectable CGFloat progressLineWidth;

//Start angle
@property (nonatomic, assign) IBInspectable int startAngle;

//End angle
@property (nonatomic, assign) IBInspectable int endAngle;

代理

/**
 *  Progress report
 *
 *  @param progressView CATCurveProgressView
 *  @param progress     progress changed
 *  @param lastProgress progress last time
 */
-(void)progressView:(CATCurveProgressView *)progressView progressChanged:(CGFloat)progress lastProgress:(CGFloat)lastProgress;