To run the example project, clone the repo, and run pod install
from the Example directory first.
TWGCDTimer is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'TWGCDTimer'
self.timerTask = [TWGCDTimer execTaskBlock:^{
if(self.timeout <= 0){
/// 取消任务
[TWGCDTimer cancelTask:self.timerTask];
NSLog(@"timer停止计时");
return;
}
if(self.timeout > 0){
self.timeout--;
NSLog(@"%zd", self.timeout);
}
} start:0 interval:1 repeats:YES async:NO];
tiltwang
TWGCDTimer is available under the MIT license. See the LICENSE file for more info.