You could use the Reachability class from Apple, it has a method called -reachabilityWithHostName:
, which will inform you if a host is reachable and which connection(s) are available (WiFi, GSM).
Check the code: http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html
Use the reachability class of apple. reachability This might help you:)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.