Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yashthaker7/typrogressbar
Custom animating gradient progress bar
https://github.com/yashthaker7/typrogressbar
animation customprogress gradient gradientprogress gradientprogressbar ios progressbar progressview swift swift4 uiprogressview with xcode
Last synced: 2 days ago
JSON representation
Custom animating gradient progress bar
- Host: GitHub
- URL: https://github.com/yashthaker7/typrogressbar
- Owner: yashthaker7
- License: mit
- Created: 2018-05-12T18:21:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-05T12:08:23.000Z (over 3 years ago)
- Last Synced: 2024-09-24T03:17:04.739Z (3 days ago)
- Topics: animation, customprogress, gradient, gradientprogress, gradientprogressbar, ios, progressbar, progressview, swift, swift4, uiprogressview, with, xcode
- Language: Swift
- Size: 1.07 MB
- Stars: 153
- Watchers: 3
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TYProgressBar
[![Version](https://img.shields.io/cocoapods/v/TYProgressBar.svg?style=flat)](https://cocoapods.org/pods/TYProgressBar/)
[![License](https://img.shields.io/cocoapods/l/NumberPicker.svg?style=flat)](https://cocoapods.org/pods/TYProgressBar/)
[![Platform](https://img.shields.io/cocoapods/p/TYProgressBar.svg?style=flat)](https://cocoapods.org/pods/TYProgressBar/)Custom animating gradient progress bar.
![gif](ScreenShot/TYProgressBar.gif)
## Installation
TYProgressBar is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'TYProgressBar'
```How to use
---------
```swift
let progressBar = TYProgressBar()func setupProgressBar() {
progressBar.frame = CGRect(x: 0, y: 0, width: 220, height: 220)
progressBar.center = self.view.center
self.view.addSubview(progressBar)
}
```
Customize
---------
You can change gradient color and label font and text color
```swift
progressBar.trackColor = UIColor(white: 0.2, alpha: 0.5)
progressBar.gradients = [UIColor.red, UIColor.yellow]
progressBar.textColor = .orange
progressBar.font = UIFont(name: "HelveticaNeue-Medium", size: 22)!
progressBar.lineDashPattern = [10, 4] // lineWidth, lineGap
progressBar.lineHeight = 5
```Show progress
---------
```swift
progressBar.progress = 0.5 // between 0 to 1
```![ss1](ScreenShot/ss1.png) ![ss2](ScreenShot/ss2.png) ![ss3](ScreenShot/ss3.png)
## Author
Yash Thaker, [email protected]
## License
TYProgressBar is available under the MIT license. See the LICENSE file for more info.