Latest 1.5.0
Homepage https://github.com/mkoehnke/TimeFractionProgressView
License MIT
Platforms ios 8.2, requires ARC

This is a simple view to display multiple temporal progress graphs at the same time. The default appearance is a plain progress bar, but it’s possible to define custom paths. Take a look at the Example project to see how to use this library.

TimeFractionProgressView

Installation

Copy the TimeFractionProgressView.swift file to your Swift project, add it to your target and you’re good to go.

Usage

The easiest way to get started is to add the TimeFractionProgressView as a custom view in your Storyboard. After that, you set the overall duration and add the number of time fractions, you want to display, in code:

progressView.duration = 30.0

let blue = TimeFraction(color: UIColor.blueColor())
progressView.addTimeFraction(blue)

let green = TimeFraction(color: UIColor.greenColor())
progressView.addTimeFraction(green)

To start and stop a time fraction, you simply call the following methods on the relevant object:

blue.start()
green.stop()

The duration of each time fraction can be monitored by observing the duration property using either Key-Value-Observing or a Swift equivalent.

Custom Graph

A different appearance can be accomplished by setting UIBezierPath to the customPath property.

let bezierPath = UIBezierPath(ovalInRect: view.bounds)
bezierPath.lineWidth = 10
progressView.customPath = bezierPath

License

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

Recent Changes

The release notes can be found here.

Latest podspec

{
    "name": "TimeFractionProgressView",
    "version": "1.5.0",
    "summary": "Easy to use iOS view for displaying multiple temporal progress graphs.",
    "description": "Easy to use iOS view for displaying multiple temporal progress graphs, written in Swift.",
    "homepage": "https://github.com/mkoehnke/TimeFractionProgressView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "Mathias Ku00f6hnke",
    "platforms": {
        "ios": "8.2"
    },
    "source": {
        "git": "https://github.com/mkoehnke/TimeFractionProgressView.git",
        "tag": "1.5.0"
    },
    "source_files": "TimeFractionProgressView/*.{swift}",
    "exclude_files": "Classes/Exclude",
    "requires_arc": true
}

Pin It on Pinterest

Share This