TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Feb 2015 |
Maintained by Joefrey Kibuule.
JSKTimerView is a simple custom UIView that acts as a self-contained, animating timer.
To run the example project, clone the repo, and run pod install
from the Example directory first.
#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");
}
Joefrey Kibuule, [email protected]
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.