Latest 0.4.1
Homepage https://github.com/jeffkibuule/JSKTimerView
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit, Foundation, CoreGraphics
Authors

CI Status
Version
License
Platform

GIF

Screenshot0
Screenshot1
Screenshot2
Screenshot3

JSKTimerView is a simple custom UIView that acts as a self-contained, animating timer.

  • Set up timer based in seconds
  • Start timer and have it animate automatically
  • Full control of timer: start, pause, stop, reset, and reset
  • Manually set timer progress and have timer update accordingly
  • Get notified when timer has finished
  • iOS 7+ and up

Usage

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

Requirements

  • iOS 7.0+
  • ARC

Installation

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

pod "JSKTimerView"

Getting Started

#import <JSKTimerView/JSKTimerView.h>    // Import the relevant header

Create a 60-sec timer

JSKTimerView *timerView = [[JSKTimerView alloc] init];
[timerView setTimerWithDuration:60];

Start a timer

[timerView startTimer];

Pause a timer

[timerView pauseTimer];

Stop a timer

[timerView stopTimer];

Reset a timer

[timerView resetTimer];

Restart a timer

[timerView restartTimer];

Set timer progress manually

// Progress should be a value between 0 and 1, timer value updates automatically
timerView.progress = 0.5;

Know when the timer naturally ends

// Assume self refers to object that implements timerDidFinish method of JSKTimerViewDelegate
timerView.setDelegate = self;

- (void)timerDidFinish {
    NSLog(@"Timer finished");
}

Author

Joefrey Kibuule, [email protected]

License

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

Copyright © 2015 Joefrey Kibuule.

Please provide attribution, it is greatly appreciated.

Latest podspec

{
    "name": "JSKTimerView",
    "version": "0.4.1",
    "summary": "A simple custom UIView that acts as a self-contained, animating timer.",
    "homepage": "https://github.com/jeffkibuule/JSKTimerView",
    "screenshots": [
        "https://raw.githubusercontent.com/jeffkibuule/JSKTimerView/master/Screenshots/screenshot0.png",
        "https://raw.githubusercontent.com/jeffkibuule/JSKTimerView/master/Screenshots/screenshot1.png",
        "https://raw.githubusercontent.com/jeffkibuule/JSKTimerView/master/Screenshots/screenshot2.png",
        "https://raw.githubusercontent.com/jeffkibuule/JSKTimerView/master/Screenshots/screenshot3.png"
    ],
    "license": "MIT",
    "authors": {
        "Joefrey Kibuule": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jeffkibuule/JSKTimerView.git",
        "tag": "0.4.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "JSKTimerView": [
            "Pod/Assets/*.png"
        ]
    },
    "public_header_files": "Pod/Classes/**/*.h",
    "frameworks": [
        "UIKit",
        "Foundation",
        "CoreGraphics"
    ]
}

Pin It on Pinterest

Share This