ZFProgressView
A simple digit progress view.(version1.3 使用GCD定时器代替NSTimer,避免内存泄露问题)
Install / Use
/learn @WZF-Fei/ZFProgressViewREADME
ZFProgressView
A simple digit progress view.
Version 1.1 加入不同进度样式
ZFProgressViewStyleNone, //默认样式
ZFProgressViewStyleSquareSegment, //方形格子进度条
ZFProgressViewStyleRoundSegment, //圆形格子进度条
ZFProgressViewStyleImageSegment, //带有图片的进度条
##Version 1.2
- 实现音乐播放器进度,设置音乐播放时间进行播放
- 可定时更换音乐封面
Version 1.3
1.可自定义进度条的起止点。
Example:
<p align="center" > <img src="https://github.com/WZF-Fei/ZFProgressView/blob/master/ZFProgressViewExampleTests/ZFProgressView.gif" width="266" height="500"/> </p>##How to use ZFProgressView?
Add "ZFProgressView.h" and "ZFProgressView.m" in your project. Then
ZFProgressView *progress = [[ZFProgressView alloc] initWithFrame:CGRectMake(50, 150, 100, 100)];
With Style
ZFProgressView *progress = [[ZFProgressView alloc] initWithFrame:CGRectMake(50, 150, 100, 100)
style:ZFProgressViewStyleRoundSegment];
###1. setProgressStrokeColor
[progress setProgressStrokeColor:[UIColor orangeColor]];
###2. setBackgroundStrokeColor
[progress setBackgroundStrokeColor:[UIColor yellowColor]];
###3. setDigitTintColor
[progress setDigitTintColor:[UIColor greenColor]];
###4. use an animation to show digit progress
[progress setProgress:0.8 Animated:YES];
or
[progress setProgress:0.8 Animated:NO];
###5. add an image progress.image = [UIImage imageNamed:@"1.jpg"];
###6. 加入进度播放时间 (秒)
progress.timeDuration = 60;
