https://github.com/derekcoder/swiftprogressview
A set of progress views written in Swift
https://github.com/derekcoder/swiftprogressview
ios ios-swift progress-view swift swiftprogressview
Last synced: 10 months ago
JSON representation
A set of progress views written in Swift
- Host: GitHub
- URL: https://github.com/derekcoder/swiftprogressview
- Owner: derekcoder
- License: mit
- Created: 2017-10-31T07:31:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-08T09:06:20.000Z (almost 6 years ago)
- Last Synced: 2024-10-31T13:48:01.388Z (over 1 year ago)
- Topics: ios, ios-swift, progress-view, swift, swiftprogressview
- Language: Swift
- Homepage:
- Size: 17.4 MB
- Stars: 51
- Watchers: 7
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftProgressView
[](http://cocoapods.org/pods/SwiftProgressView)
[](http://cocoapods.org/pods/SwiftProgressView)
[](http://cocoapods.org/pods/SwiftProgressView)
A set of progress views written in Swift.

## Requirements
- iOS 10.0+
- Swift 4
## Installation
### CocoaPods
```
pod 'SwiftProgressView'
```
### Carthage
```
github "DerekCoder/SwiftProgressView"
```
## Usage
### Programmatically
```swift
import SwiftProgressView
let frame = CGRect(x: 100, y: 100, width: 100, height: 100)
let progressView = ProgressPieView(frame: frame)
view.addSubview(progressView)
progressView.setProgress(1.0, animated: true)
```
### IB (storyboard)
- Drag UIView & Set Class

- Change Attributes

## Classes & Attributes & Methods
* `ProgressRingView` - The class for ring progress view
* `ProgressViewPieView` - The class for pie progress view
* `progress` - 0.0 ~ 1.0, readonly. Support IBInspectable
* `observedProgress` - The progress object to use for updating the progress view
* `circleLineWidth` - The width of outer circle. Support IBInspectable
* `circleColor` - The color of outer circle. Support IBInspectable
* `progressColor` - The color of inner circle. Support IBInspectable
* `animationDuration` - The duration of animation. Support IBInspectable
* `progressLineWidth` - The width of inner circle, only for ProgressRingView. Support IBInspectable
* `isShowPercentage` - Indicate whether percentage lable is displayed or not, only for ProgressRingView. Support IBInspectable
* `percentageFontSize` - The font size of percentage label, only for ProgressRingView. Support IBInspectable
* `percentageColor` - The color of percentage label, only for ProgressRingView. Support IBInspectable
* `spacing` - The spacing of outer and inner circle, only for ProgressPieView. Support IBInspectable
* `setProgress(_ progress: CGFloat, animated: Bool)` - The method to change progress with animation or not.
## Contact
- [Blog](http://blog.derekcoder.com)
- [Twitter](https://twitter.com/derekcoder_)
- [Weibo](https://weibo.com/u/6155322764)
- Email: derekcoder@gmail.com
## License
SwiftProgressView is released under the MIT license. [See LICENSE](https://github.com/derekcoder/SwiftProgressView/blob/master/LICENSE) for details.