标签:
#pragma mark - check net status
int apiCheckNetStatus()
{
Reachability *reachNet = [Reachability reachabilityWithHostName:@"www.apple.com"];//www.newsmth.net
int retNetStatus = -1;
switch ([reachNet currentReachabilityStatus]) {
case NotReachable:
retNetStatus = -1;
break;
case ReachableViaWWAN:
retNetStatus = 0;
break;
case ReachableViaWiFi:
retNetStatus = 1;
break;
default:
break;
}
return retNetStatus;
}
标签:
原文地址:http://www.cnblogs.com/wcLT/p/4734758.html