You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
891 B
31 lines
891 B
![]()
2 years ago
|
//
|
||
|
// PathView.h
|
||
|
// CircleGradientLayer
|
||
|
//
|
||
|
// Created by Dinotech on 16/1/6.
|
||
|
// Copyright © 2016年 Dinotech. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import <UIKit/UIKit.h>
|
||
|
#import <CoreGraphics/CoreGraphics.h>
|
||
|
|
||
|
#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
|