如何接收连接类型已更改的通知(3G、Edge、Wifi、GPRS)
有没有办法发现当前连接是 3G、Edge 还是 WiFi,并收到通知?或者只是一种检测连接是否是 WiFi 的方法?
Is there a way to discover whether the current connection is 3G, Edge or WiFi, and receive a notification of this? Or just a way do discover whether the connection is WiFi?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该使用 Apple 的 Reachability 类
http://developer.apple。 com/library/ios/#samplecode/Reachability/Listings/Classes_Reachability_h.html
实现后,您可以在委托中使用它:
You should use Apple's Reachability class
http://developer.apple.com/library/ios/#samplecode/Reachability/Listings/Classes_Reachability_h.html
after implementation you can use this in the delegate:
是的,苹果公司有一个示例项目可以证明这一点。 可达性
和 这是一个示例。
Yes, Apple has an example project that shows that. Reachability
And here's an example.