测试已测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可 | MIT |
released最后发布 | 2015年11月 |
由Grigory Lutkov维护。
依赖 | |
AFNetworking | ~> 2.5.0 |
可达性 | ~> 3.2 |
XMLReader-Arc | ~> 1.1 |
LGHelper | ~> 1.1.0 |
这为AFNetworking创建了一个iOS封装,使其易于使用。
platform :ios, '6.0'
pod 'LGConnection', '~> 1.0.0'
在您需要使用该库的源文件中,导入头文件
#import "LGConnection.h"
您有几种初始化方法
- (instancetype)initWithRepeatAfterConnectionLost:(BOOL)repeat;
- (instancetype)initWithRepeatAfterConnectionLost:(BOOL)repeat
connectionLostHandler:(void(^)())connectionLostHandler
connectionRestoreHandler:(void(^)())connectionRestoreHandler;
LGConnection使用可达性(Reachability)来监控网络连接。“RepeatAfterConnectionLost”表示在恢复连接的过程中,所有请求都将尝试重新连接。
详情请见LGConnection.h
LGConnection遵循MIT许可协议。有关详细信息,请见LICENSE