Popularity
1.6
Stable
Activity
0.0
Stable
42
3
16

Description

Simple and powerful animated progress bar with dots for iOS.

Programming language: Swift
License: MIT License
Tags: Animation     UI     Progress     iOS    
Latest version: v1.0.4

DottedProgressBar alternatives and similar libraries

Based on the "Animation" category.
Alternatively, view DottedProgressBar alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of DottedProgressBar or a related project?

Add another 'Animation' Library

README

alt tag

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

alt tag

Requirements

  • iOS 8.0+
  • Swift 3.0+

Installation

DottedProgressBar is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "DottedProgressBar"

Easy to use

Import library

import DottedProgressBar

Initialize DottedProgressBar in one line of code

let progressBar = DottedProgressBar(frame: CGRect(x: 50, y: 50, width: 200, height: 20),
                                    numberOfDots: 6,
                                    initialProgress: 1)
view.addSubview(progressBar)

Custom appearance

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.

self.setProgress(4, animated: true)
self.setNumberOfDots(8, animated: true)

Customize animations

Customize duration of animations and pause between consecutive animations

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.


*Note that all licence references and agreements mentioned in the DottedProgressBar README section above are relevant to that project's source code only.