判断设备网络状态 Reachability.h Reachability.m文件添加到工程,引入相对应的库文件即可使用,调用方法如下:
+(BOOL)hasNet{ if([Reachability IsEnableWIFI]||[Reachability IsEnable3G]){ //皆为静态方法,不需新建对象。方便。 return YES; } return NO; }
文件都在附近中,希望可以帮到需要之人。
判断设备网络状态 Reachability.h Reachability.m文件添加到工程,引入相对应的库文件即可使用,调用方法如下:
+(BOOL)hasNet{ if([Reachability IsEnableWIFI]||[Reachability IsEnable3G]){ //皆为静态方法,不需新建对象。方便。 return YES; } return NO; }
文件都在附近中,希望可以帮到需要之人。