Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikola9core/dottedprogressbar
Simple and powerful animated progress bar with dots
https://github.com/nikola9core/dottedprogressbar
animation ios progress progress-bar swift swift-3 swift-animation uiview-components
Last synced: about 2 months ago
JSON representation
Simple and powerful animated progress bar with dots
- Host: GitHub
- URL: https://github.com/nikola9core/dottedprogressbar
- Owner: nikola9core
- License: mit
- Archived: true
- Created: 2017-04-16T18:13:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-02T16:21:40.000Z (about 5 years ago)
- Last Synced: 2024-09-24T20:35:36.709Z (about 2 months ago)
- Topics: animation, ios, progress, progress-bar, swift, swift-3, swift-animation, uiview-components
- Language: Swift
- Homepage:
- Size: 178 KB
- Stars: 43
- Watchers: 4
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![alt tag](https://s24.postimg.org/ok064585x/dotted-progress-title.png)
[![CI Status](http://img.shields.io/travis/nikola9core/DottedProgressBar.svg?style=flat)](https://travis-ci.org/nikola9core/DottedProgressBar)
[![Version](https://img.shields.io/cocoapods/v/DottedProgressBar.svg?style=flat)](http://cocoapods.org/pods/DottedProgressBar)
[![License](https://img.shields.io/cocoapods/l/DottedProgressBar.svg?style=flat)](http://cocoapods.org/pods/DottedProgressBar)
[![Platform](https://img.shields.io/cocoapods/p/DottedProgressBar.svg?style=flat)](http://cocoapods.org/pods/DottedProgressBar)## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
![alt tag](https://gifyu.com/images/dotted-progress-bar-ezgif-480.gif)
## Requirements
* iOS 8.0+
* Swift 3.0+## Installation
DottedProgressBar is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "DottedProgressBar"
```
## Easy to use
Import library
```swift
import DottedProgressBar
```Initialize `DottedProgressBar` in one line of code
```swift
let progressBar = DottedProgressBar(frame: CGRect(x: 50, y: 50, width: 200, height: 20),
numberOfDots: 6,
initialProgress: 1)
view.addSubview(progressBar)
```## Custom appearance
```swift
let progressBar = DottedProgressBar()
progressBar.appearance = DottedProgressBar.DottedProgressAppearance(
dotRadius: 8.0,
dotsColor: UIColor.orange.withAlphaComponent(0.5),
dotsProgressColor: UIColor.red,
backColor: UIColor.clear
)
view.addSubview(progressBar)
progressBar.frame = CGRect(x: 50, y: 50, width: 200, height: 20)progressBar.setNumberOfDots(6, animated: false)
progressBar.setProgress(1, animated: false)
```## Animations
Animations can be called repeatedly because they have theirs own queue. Each animation will wait previous to finish and then will be executed.
```swift
self.setProgress(4, animated: true)
self.setNumberOfDots(8, animated: true)
```## Customize animations
Customize duration of animations and pause between consecutive animations
```swift
progressBar.dotsNumberChangeAnimationDuration = 0.6
progressBar.progressChangeAnimationDuration = 0.7
progressBar.pauseBetweenConsecutiveAnimations = 1.0
```## License
DottedProgressBar is available under the MIT license. See the LICENSE file for more info.