ZYProgressView
快照
示例
要运行示例项目,请克隆仓库并在目录下运行。
要求
iOS 8.0
或更高版本
安装
ZYProgressView 通过 CocoaPods 可用。要安装,只需将以下行添加到您的 Podfile 中:CocoaPods
pod "ZYProgressView"
使用
线路
初始化
ZYLineProgressView *progressView = [[ZYLineProgressView alloc] initWithFrame:CGRectMake(20, 150, 200, 6)];
更新进度
progressView.progress = 0.8;
更新配置
[progressView updateConfig:^(ZYLineProgressViewConfig *config) {
config.isShowDot = YES;
}];
环形
初始化
ZYCircleProgressView *progressView = [[ZYCircleProgressView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
更新进度
progressView.progress = 0.3;
更新配置
[progressView updateConfig:^(ZYCircleProgressViewConfig *config) {
config.lineWidth = 3;
config.lineCap = kCALineCapSquare;
config.startAngle = - (M_PI + M_PI_4);
config.endAngle = M_PI_4;
}];
作者
ripper, [email protected]
许可证
ZYProgressView 适用于 MIT 许可证。有关更多信息,请参阅 LICENSE 文件。