Simple and powerful animated progress bar with dots

Overview

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.

You might also like...
SwiftUI animated image view that works on iOS and layout just as SwiftUI.Image

SwiftUI.AnimatedImage SwiftUI animated image view that works on iOS and layout just as SwiftUI.Image Screen.Recording.2021-07-31.at.02.18.33.mov Insta

ButtonClickStyle - This is a Customizable/Designable Button View, with 15 animated click styles, that allows you to design your own buttons from subviews, in storyboard and xib right away.
ButtonClickStyle - This is a Customizable/Designable Button View, with 15 animated click styles, that allows you to design your own buttons from subviews, in storyboard and xib right away.

ButtonClickStyle - This is a Customizable/Designable Button View, with 15 animated click styles, that allows you to design your own buttons from subviews, in storyboard and xib right away.

Appstore card animation transition. UICollectionView and UITableView card expand animated transition
Appstore card animation transition. UICollectionView and UITableView card expand animated transition

Appstore card animation transition. UICollectionView and UITableView card expand animated transition. This library tries to add the appstore transition to your own app. The goal is to be as simple as possible to integrate in an app while keeping the flexibility and customization alive.

πŸš€  It Makes easy to track your task πŸ”₯ Beautiful & Animated UIπŸ‘¨πŸ»β€πŸ’»  . Contributions are always welcome πŸ€—
πŸš€ It Makes easy to track your task πŸ”₯ Beautiful & Animated UIπŸ‘¨πŸ»β€πŸ’» . Contributions are always welcome πŸ€—

Taskey πŸš€ What is Taskey πŸ€” ? Taskey is an application build in SwiftUI to track your task with a beautiful animations and UI . Also used core data to

An animated trophy banner that looks like Xbox achievement πŸ†

TrophyKit An animated trophy banner that looks like Xbox achievement. Demo demo.mov Usage Requirements iOS 14.0+ tvOS 14.0+ Swift 5.3+ Installation Tr

Colorful - A SwiftUI implementation of AppleCard's animated colorful blur background.
Colorful - A SwiftUI implementation of AppleCard's animated colorful blur background.

Colorful - A SwiftUI implementation of AppleCard's animated colorful blur background.

An animated label for displaying numbers
An animated label for displaying numbers

RollingDigitsLabel A simple label that animates a number with each digit falling into place. Installation Swift Package Manager dependencies: [ .p

 AnimatedWaveform provides the user with an animated version of the waveform.circle SF Symbol in SwiftUI.
AnimatedWaveform provides the user with an animated version of the waveform.circle SF Symbol in SwiftUI.

AnimatedWaveform AnimatedWaveform is a Swift Package designed for SwiftUI. It provides the user with an animated version of the waveform.circle SF Sym

Animated Minimal Podcast App UI using SwiftUi 3.0 πŸ€“
Animated Minimal Podcast App UI using SwiftUi 3.0 πŸ€“

Minimal Podcast App UI Animated Minimal Podcast App UI using SwiftUi 3.0 πŸ€“ Video Preview Screenshots Features SwiftUI 3D Card Animation SwiftUI Delay

Comments
  • Issue going back to zero progress.

    Issue going back to zero progress.

    While using a hacked up version of your code to mimic the dots used in passcode entry, I was trying to set the progress back to zero. This lead to an invalid state. I believe there might be times where a progress bar (not just my hacky use case) would need to return back to zero progress. I think updating line 161 to be "if nextAnimation.value >= 0" would fix this issue (instead of > 0).

    image

    opened by stewartboyd119 5
Owner
Nikola Corlija
Nikola Corlija
Fully customizable circular progress bar written in Swift.

Fully customizable, circular progress bar written in Swift. Example To run the example project, clone the repo, and run pod install from the Example d

Lionheart Software 137 Nov 11, 2022
A macOS menu bar app for copy animated LIHKG stickers to clipboard.

LIHKG GIFs A macOS menu bar app created for easily sending LIHKG stickers to Microsoft Teams. This app will try to load a GIF selected by user into th

Ice Lam 3 Nov 26, 2022
Simple Animated tabbar with native control

SSCustomTabbar Simple Animated tabbar with native control. Requirements iOS 11.0+ Xcode 10.0+ Installation SSCustomTabbar doesn't contain any external

Simform Solutions 452 Dec 13, 2022
ScriptLib - Early and in progress scripting suite for Swift apps

ScriptLib Early and in progress scripting suite for Swift apps. The goal is to c

Jesse Grosjean 13 Sep 24, 2022
Swiftui-animation-observer - Track SwiftUI animation progress and completion via callbacks

SwiftUI Animation Observer Track SwiftUI animation progress and completion via c

Gordan GlavaΕ‘ 9 Nov 5, 2022
Circular progress Animation

JDCircularProgress JDCircularProgress is animateable UIView that can significantly enhance your users’ experiences and set your app apart from the res

Jawad Ali 8 May 16, 2022
RAProgressRing is the simplest approach to bringing circular progress in your application with minimal code.

RAProgressRing RAProgressRing is the simplest approach to bringing circular progress in your application with minimal code. Features It's customisable

Rohit Arora 5 Nov 4, 2022
A powerful, elegant, and modular animation library for Swift.

MotionMachine provides a modular, powerful, and generic platform for manipulating values, whether that be animating UI elements or interpolating prope

Brett Walker 387 Dec 9, 2022
Presentation helps you to make tutorials, release notes and animated pages.

Presentation helps you to make tutorials, release notes and animated pages.

HyperRedink 3k Dec 28, 2022