[
](http://cocoapods.org/?q= HLQRCodeScanner)
##特点
- 基于GCD实现的定时器,稳定好用
- 提供Center进行定时器统一管理
- 当APP进入后台时自动暂停所有定时器,APP恢复时统一唤醒
====
##使用方法
- 直接创建
[[HLTimerCenter defaultCenter] createTimer:1 afterTime:0 repeatsCount:5 repeats:NO autoPlay:YES handler:^{
NSLog(@"泡一下");
}];- 分步创建
HLTimer *timer = [[HLTimer alloc] initWithTime:1 andAfterTime:0 andRepeatsCount:5 isRepeats:NO completionHandler:^{
NSLog(@"跑一下");
}];
[[HLTimerCenter defaultCenter] addTimer:timer autoPlay:NO];该库需运行在 iOS 8.0 和 Xcode 7.0以上环境.
HLTimerCenter is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "HLTimerCenter"wangshiyu13, wangshiyu13@163.com
HLNetworking is available under the MIT license. See the LICENSE file for more info.