Skip to content

RomanticEncounter/FLCircleProgressView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLCircleProgressView

A simple annulus progress widget.

一个简单的环形进度组件。

用UIBezierPath + CAShaperLayer绘制

实际效果

如何使用

FLCircleProgressView *circleProgressView = [[FLCircleProgressView alloc] init];
circleProgressView.frame = CGRectMake(CGRectGetWidth(self.view.frame) * 0.5 - 100.0, CGRectGetHeight(self.view.frame) * 0.5 - 100.0, 200.0, 200.0);
//设置背景颜色
circleProgressView.backgroundColor = [UIColor whiteColor];
//设置进度条颜色
circleProgressView.progressColor = [UIColor orangeColor];
//设置字体大小
circleProgressView.contentTextFont = [UIFont systemFontOfSize:18.0];
//设置文字
circleProgressView.contentText = @"-----------80.00℃-----------";
//设置进度[0, 1]
circleProgressView.progress = 0.8;
[self.view addSubview:circleProgressView];

重新赋值

//可直接赋值,有动画效果
self.circleProgressView.progress = 0.5;
self.circleProgressView.contentText = @"Test";

About

A circular progress widget

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published