Skip to content

KochIK/KVTimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KVTimer

The circular timer for iOS - KVTimer

Installation

Using CocoaPods

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

pod "KVTimer"

Manual

Download the project and add the files KVTimer.{h,m} to your project.

Usage

/*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)*/];

Method delegate:

- (void)KVTimer:(KVTimer *)timer willTimeChange:(NSString *)newTime{
   NSLog(@"Time: %@", newTime);
}

- (void)willTimerEnd:(KVTimer *)timer{
   NSLog(@"Oops");
}

Author

Vlad Kochergin, kargod@ya.ru

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published