// // PathView.h // CircleGradientLayer // // Created by Dinotech on 16/1/6. // Copyright © 2016年 Dinotech. All rights reserved. // #import #import #define degressToRadius(ang) (M_PI*(ang)/180.0f) //把角度转换成PI的方式 #define PROGRESS_WIDTH 80 // 圆直径 #define PROGRESS_LINE_WIDTH 4 //弧线的宽度 @interface PathView : UIView { CAShapeLayer * _trackLayer; CAShapeLayer * _progressLayer; CGFloat _lineWidth; UIColor * _startColor; UIColor * _endColor; double _turns; CGFloat _animationDuration; CAShapeLayer * _grain; } - (instancetype)initWithFrame:(CGRect)frame LineWidth:(CGFloat)lineWidth; - (void)StartAnimationWithStartColor:(UIColor*)startColor EndColor:(UIColor*)endColor NumberOfTurns:(double)turns AnimationDuration:(CGFloat)animationDuration Delay:(CGFloat)delay; @end