如何使用可达性类来检测网络状态? [英] How to use Reachability class to detect network status?

查看:59
本文介绍了如何使用可达性类来检测网络状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个需要互联网的应用程序.我想在我的项目中使用可达性类,并且想要检测用户是否没有互联网连接,无论该技术是wifi,还是Cellular.我需要逐步的指导.

I am creating an app which requires internet. I want to use reachability class in my project and I want to detect if user has no internet connection whatever the technique is either wifi, Cellular. I want a step by step guide for this.

推荐答案

您可以从可达性示例应用程序.还有一些关于此主题的有关SO的条目.

You can start with Reachability sample application. There is also some entries on SO that are about the subject.

这篇关于如何使用可达性类来检测网络状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆