iPhone Wifi开启还是关闭? [英] iPhone Wifi on or off?

查看:174
本文介绍了iPhone Wifi开启还是关闭?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS框架中,如何检查用户是否启用了Wifi无线电?请注意,我对通过Wifi的可达性不感兴趣,而是用户关闭了设备。谢谢。

Within iOS framework, how can one check if the Wifi radio is enabled by the user or not? Please note that I'm not interested in the reachability through Wifi but rather if the device is turned off by the user. Thanks.

推荐答案

正如@magma在评论中所提到的,您可能必须使用Reachability源代码。
到目前为止,根据我的经验以及其他人一直在谈论的内容,没有布尔值可以告诉您用户是否在设置中关闭了Wi-Fi。通过检查设备是否可以访问互联网,您只需推断并推断(假设)用户已关闭Wi-Fi。

As mentioned in comment by @magma, you may have to use Reachability source code. So far based on my experience and what others have been talking, there is NO boolean which can tell you if the user has turned off Wi-Fi in Settings. By checking if the device can reach internet, you just have to deduce and conclude(assume) the user has turned Wi-Fi off.

这篇关于iPhone Wifi开启还是关闭?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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