The circular timer for iOS - KVTimer
KVTimer is available through CocoaPods, to install it simply add the following line to your Podfile:
pod "KVTimer"
Download the project and add the files KVTimer.{h,m}
to your project.
/*Create its Outlet -*/ @property (weak, nonatomic) IBOutlet KVTimer *timer;
self.timer.delegate = self;
[self.timer setShowTimerLabel:YES];
[self.timer setMaxTime:120 minTime:0];
self.timer.interval = KVIntervalSecond;
KVStyle *style = [KVStyle initWithFillColor:[UIColor greenColor]
strokeColor:[UIColor blackColor]
lineWidth:2
radius:10];
[self.timer setStylePin:<#(KVStyle *)#>]
[self.timer setStyleLine:<#(KVStyle *)#>]
[self.timer setStyleCircle:<#(KVStyle *)#>]
[self.timer startTimer:/* YES / NO */];
[self.timer setShowTimerLabel:/* YES / NO*/];
[self.timer setShowKofLabel:/* YES / NO*/];
[self.timer setKofString:@"min"];
[self.timer setInterval:KVIntervalMinute /*(KVInterval enum)*/];
- (void)KVTimer:(KVTimer *)timer willTimeChange:(NSString *)newTime{
NSLog(@"Time: %@", newTime);
}
- (void)willTimerEnd:(KVTimer *)timer{
NSLog(@"Oops");
}
Vlad Kochergin, kargod@ya.ru
KVTimer is available under the MIT license. See the LICENSE file for more info.