用Cocoa Pods导入控件以后 直接导头文件 复制以下代码[SCNetworkReachability host:@"github.com" reachabilityStatus:^(SCNetworkStatus status){ switch (status) { case SCNetworkStatusReachableViaWiFi: NSLog(@"Reachable via WiFi"); break; case SCNetworkStatusReachableViaCellular: NSLog(@"Reachable via Cellular"); break; case SCNetworkStatusNotReachable: NSLog(@"Not Reachable"); break; }}];