Skip to content

khawajafarooq/ProgressMeter

Repository files navigation

ProgressMeter 🎰

[![Version](https://img.shields.io/cocoapods/v/ProgressMeter.svg?style=flat)](http://cocoapods.org/pods/ProgressMeter) [![License](https://img.shields.io/cocoapods/l/ProgressMeter.svg?style=flat)](http://cocoapods.org/pods/ProgressMeter) [![Platform](https://img.shields.io/cocoapods/p/ProgressMeter.svg?style=flat)](http://cocoapods.org/pods/ProgressMeter)

Requirements

Support Version
iOS 9.0
Swift 4.0

Installation

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

pod 'ProgressMeter'

Use Cases

Health App 🏃‍♂️

Banking App 🏦

Example

Interface Builder

Drag & drop a UIView from the object library and follow the steps:

Step 1

Step 2

Code

Hook your view (ProgressMeter) property on your view controller and try out the snippets inside viewDidLoad;

Snippet # 1: Looking for setting up the control with your own data 👨‍🏫

func setupWithCustomData() {
    progressControl.maxValue = 20000
    progressControl.data = [1999, 4999, 9999, 14999]
    progressControl.progress = 14999 / 20000
}

Snippet # 2: Don't have the data set? ProgressMeter can create its own data 🔢

func setupWithControlData() {
    progressControl.maxValue = 20000
    progressControl.numberOfDivisions = 4
    progressControl.progress = 0.4
}

Snippet # 3: Setup the visual aspect 💄

func visualSetup() {
    progressControl.progressTintColor = .purple�
    progressControl.trackTintColor = .gray
    progressControl.borderWidth = 1
    progressControl.borderColor = .darkGray
    progressControl.annotationTextColor = .purple
    progressControl.dividerColor = .darkGray
}

Issues

  • Some tweakings required to use ProgressMeter inside a Stack View

Up Coming Features

  • Annotations on bottom; Currenty annotations can only display on the top of ProgressMeter

Author 🙏🏻

Web: Khawaja Farooq

Twitter: @khfarooq

Medium: @khfarooq

License

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

About

Measuring the progress with annotations 🔱

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published