HLTimerCenter 1.0.0

HLTimerCenter 1.0.0

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最新发布2016年10月

wangshiyu13维护。



  • 作者:
  • wangshiyu13

基于GCD的定时管理器

特点

  1. 基于GCD实现的定时器,稳定好用
  2. 提供中心进行定时器统一管理
  3. 当APP进入后台时自动暂停所有定时器,APP恢复时统一唤醒

使用方法

一、HLAPI相关

1) 直接创建

[[HLTimerCenter defaultCenter] createTimer:1 afterTime:0 repeatsCount:5 repeats:NO autoPlay:YES handler:^{
    NSLog(@"泡一下");
}];

2) 分步创建

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可以通过CocoaPods访问。要安装它,只需将以下行添加到您的Podfile中

pod "HLTimerCenter"

作者

wangshiyu13, [email protected]

开源协议

HLNetworking在MIT许可证下可用。有关更多信息,请参阅LICENSE文件。