Home

Awesome

RetroProgress

CI Status Version Carthage Compatible License Platform Swift

Description

Do you miss the 90s? We know you do. Dial-up internet, flickering screens, brightly colored websites and, of course, this annoyingly slow progress bar that has been invented to test your patience. Yes, it was a while ago, but we don't want it to be forgotten. Meet RetroProgress, a progress bar made to cure your 90s nostalgia.

Table of Contents

<img src="https://github.com/vadymmarkov/RetroProgress/blob/master/Images/icon.png" width="202" height="203" alt="RetroProgress Icon" align="right" />

Usage

Are you excited to bring this thing back from the dead? So are we. Let's use default configuration and see what we get out-of-the-box:

let progressView = ProgressView(frame: CGRect(x: 0, y: 0, width: 360, height: 30))
progressView.animateProgress(to: 0.8)
<div align="center"> <img src="https://github.com/vadymmarkov/RetroProgress/blob/master/Images/example1.png" alt="RetroProgress" width="350" height="85" /> </div><br/>

Do you think it's way too retro? Let's try to make it more modern:

let progressView = ProgressView(frame: CGRect(x: 0, y: 0, width: 360, height: 30))

// Configure
progressView.layer.cornerRadius = 10
progressView.layer.borderColor = UIColor.black.cgColor
progressView.trackColor = .white
progressView.separatorColor = .black
progressView.progressColor = UIColor(
  red: 218/255,
  green: 236/255,
  blue: 255/255,
  alpha: 1
)

// Set progress
progressView.animateProgress(to: 0.8)
<div align="center"> <img src="https://github.com/vadymmarkov/RetroProgress/blob/master/Images/example2.png" alt="RetroProgress" width="350" height="85" /> </div><br/>

Not a fan of those separators? Let's try without them:

let progressView = ProgressView(frame: CGRect(x: 0, y: 0, width: 360, height: 30))

// Configure
progressView.numberOfSteps = 0
progressView.progressInset = .zero
progressView.layer.cornerRadius = 15
progressView.layer.borderColor = UIColor.white.cgColor
progressView.trackColor = .black
progressView.progressColor = .white

// Set progress
progressView.animateProgress(to: 0.8)
<div align="center"> <img src="https://github.com/vadymmarkov/RetroProgress/blob/master/Images/example3.png" alt="RetroProgress" width="350" height="85" /> </div><br/>

The options are limitless. Think big, now it's your turn to make the progress bar great again.

Public properties

Public methods

Installation

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

pod 'RetroProgress'

RetroProgress is also available through Carthage. To install just write into your Cartfile:

github "vadymmarkov/RetroProgress"

RetroProgress can also be installed manually. Just download and drop Sources folders in your project.

Author

Vadym Markov, markov.vadym@gmail.com

Credits

This library was originally done at Hyper, a digital communications agency with a passion for good code and delightful user experiences.

Contributing

Check the CONTRIBUTING file for more info.

License

RetroProgress is available under the MIT license. See the LICENSE file for more info.