https://github.com/1691665955/mzcircleprogress
圆形进度条、弧形进度条
https://github.com/1691665955/mzcircleprogress
circle circleprogress ios progress swift
Last synced: 12 months ago
JSON representation
圆形进度条、弧形进度条
- Host: GitHub
- URL: https://github.com/1691665955/mzcircleprogress
- Owner: 1691665955
- License: mit
- Created: 2021-12-18T03:30:33.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-29T07:08:30.000Z (about 4 years ago)
- Last Synced: 2024-03-15T02:46:07.546Z (almost 2 years ago)
- Topics: circle, circleprogress, ios, progress, swift
- Language: Swift
- Homepage:
- Size: 957 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MZCircleProgress
圆形进度条、弧形进度条
#### Cocoapods 引入
```
pod 'MZCircleProgress', '~> 0.0.1'
```
#### 使用
```
let circleProgress = MZCircleProgress(frame: CGRect(x: 50, y: 100, width: 200, height: 200))
// 底条颜色
circleProgress.backLineColor = .red
// 底条宽度
circleProgress.backLineWidth = 10
// 进度条颜色
circleProgress.progressColor = .orange
// 进度条宽度
circleProgress.progressWidth = 10
// 中间文本框属性、可设置文字、文字颜色、字体
circleProgress.textLabel.textColor = .orange
circleProgress.textLabel.text = "10"
// 开始弧度
circleProgress.startAngle = CGFloat(-Double.pi / 4 * 5)
// 结束弧度
circleProgress.endAngle = CGFloat(Double.pi / 4)
// 进度比例(0~1),可通过控制ratio来实现进度动画
circleProgress.ratio = 0.7
```