Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ripperhe/zyprogressview
直线进度条、圆形进度条
https://github.com/ripperhe/zyprogressview
circle ios objective-c progress
Last synced: 3 months ago
JSON representation
直线进度条、圆形进度条
- Host: GitHub
- URL: https://github.com/ripperhe/zyprogressview
- Owner: ripperhe
- License: mit
- Created: 2017-01-06T10:29:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-10T08:44:13.000Z (about 5 years ago)
- Last Synced: 2024-11-08T07:47:21.177Z (3 months ago)
- Topics: circle, ios, objective-c, progress
- Language: Objective-C
- Homepage:
- Size: 28.3 KB
- Stars: 20
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZYProgressView
[![Version](https://img.shields.io/cocoapods/v/ZYProgressView.svg?style=flat)](http://cocoapods.org/pods/ZYProgressView)
[![License](https://img.shields.io/cocoapods/l/ZYProgressView.svg?style=flat)](http://cocoapods.org/pods/ZYProgressView)
[![Platform](https://img.shields.io/cocoapods/p/ZYProgressView.svg?style=flat)](http://cocoapods.org/pods/ZYProgressView)## Snapshot
![](https://raw.githubusercontent.com/ripperhe/oss/master/2017/0327/lineprogressview.png) ![](https://raw.githubusercontent.com/ripperhe/oss/master/2017/0327/circleprogressview.png)
## Example
To run the example project, clone the repo, and run directory.
## Requirements
`iOS 8.0` or later
## Installation
ZYProgressView is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "ZYProgressView"
```## Useage
### Line
#### 初始化
```objc
ZYLineProgressView *progressView = [[ZYLineProgressView alloc] initWithFrame:CGRectMake(20, 150, 200, 6)];```
#### 更新进度
```objc
progressView.progress = 0.8;
```#### 更新配置
```objc
[progressView updateConfig:^(ZYLineProgressViewConfig *config) {
config.isShowDot = YES;
}];
```### Circle
#### 初始化
```objc
ZYCircleProgressView *progressView = [[ZYCircleProgressView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
```#### 更新进度
```objc
progressView.progress = 0.3;
```#### 更新配置
```objc
[progressView updateConfig:^(ZYCircleProgressViewConfig *config) {
config.lineWidth = 3;
config.lineCap = kCALineCapSquare;
config.startAngle = - (M_PI + M_PI_4);
config.endAngle = M_PI_4;
}];
```## Author
ripper, [email protected]
## License
ZYProgressView is available under the MIT license. See the LICENSE file for more info.