作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
如何在 iphone sdk 中获取运营商检测更新?当我是否在覆盖范围内时,我需要显示它的状态。不想检查它是否连接到互联网。
最佳答案
您可以从source中查看以下内容
Even though Apple provides sample code for monitoring changes in network availability, Apple's Reachability class is a bit outdated and doesn't support ARC (Automatic Reference Counting). If you use
AFNetworking
, then you may want to consider AFHTTPClient, which also lets you monitor network interface changes.However, my preferred solution is the wonderful Reachability class created and maintained by Tony Million. It supports ARC and leverages GCD (Grand Central Dispatch).
关于ios - 如何在 iphone sdk 中获取运营商检测更新?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24796015/
我是一名优秀的程序员,十分优秀!