Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2014
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Reachability *reachability = [Reachability reachabilityForInternetConnection]; // in this line it doesn't recognize "Reachability"
  2. [reachability startNotifier];
  3.  
  4. NetworkStatus status = [reachability currentReachabilityStatus]; // In this line it doesn't recognize "NetworkStatus"
  5.  
  6. if(status == NotReachable)
  7. {
  8. //No internet
  9. }
  10. else if (status == ReachableViaWiFi)
  11. {
  12. //WiFi
  13. }
  14. else if (status == ReachableViaWWAN)
  15. {
  16. //3G
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement