Latest 0.0.1
Homepage https://github.com/IKTSmart/IKTReachability
License MIT
Platforms ios 8.0
Authors

IKTReachability

@(iOS)[网络|网络监测]

监测网络框架

1、初始化监测网络

2、监听网络变化

初始化监听

_internetReachability = [IKTReachability reachabilityForInternetConnection];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityChanged:) name:IKTReachabilityChangedNotification object:nil];
[_internetReachability startNotifier];

监听回调

- (void)reachabilityChanged:(NSNotification *)note{
IKTReachability* curReach = [note object];
NSParameterAssert([curReach isKindOfClass:[IKTReachability class]]);

NSLog(@"state:%@",[curReach currentReachabilityStatusString]);
/*
* Do something
*/
}

cocoapods下载

target 'DemoName' do

pod 'IKTReachability'

end

反馈与建议

  • QQ交流群:314846081

Latest podspec

{
    "name": "IKTReachability",
    "version": "0.0.1",
    "summary": "u76d1u6d4bu7f51u7edc",
    "description": "u7f51u7edcu76d1u6d4bu6846u67b6 for iOS",
    "homepage": "https://github.com/IKTSmart/IKTReachability",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "IKT": "E.T.Scorpion"
    },
    "source": {
        "git": "https://github.com/IKTSmart/IKTReachability.git",
        "tag": "0.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "IKTReachability/**/*.{h,m}"
}

Pin It on Pinterest

Share This