1.项目添加系统库SystemConfiguration.framework
2.下载示例程序https://developer.apple.com/library/ios/samplecode/Reachability/Reachability.zip,将示例程序中Reachability.h和Reachability.m拖入项目中.
3.导入头文件Reachability.h
4.如图1
1.项目添加系统库SystemConfiguration.framework
2.下载示例程序https://developer.apple.com/library/ios/samplecode/Reachability/Reachability.zip,将示例程序中Reachability.h和Reachability.m拖入项目中.
3.导入头文件Reachability.h
4.如图1