Skip to content

lukagabric/LTimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

LTimer

iOS Timer

Implementation

Just import LTimer class to your project.

Sample usage

[LTimer LTimerWithTimeInterval:1 target:self repeats:YES fireBlock:^(LTimer *timer, id userInfo) {
    _label.text = [NSString stringWithFormat:@"%d", [_label.text integerValue] + 1];
}];

To stop timers use these methods:

+ (void)freeTimerForTarget:(id)target andSelector:(SEL)selector;
+ (void)freeTimersForTarget:(id)target;
+ (void)freeTimerWithTag:(int)tag;
+ (void)freeTimer:(LTimer *)timer;