Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2012  |  syntax: None  |  size: 0.42 KB  |  hits: 186  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. AFNetworking and No Internet Connection scenario
  2. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNetworkChange:) name:kReachabilityChangedNotification object:nil];
  3. reachability = [Reachability reachabilityForInternetConnection];
  4. [reachability startNotifier];
  5. NetworkStatus remoteHostStatus = [reachability currentReachabilityStatus];
  6. if(remoteHostStatus == NotReachable) {
  7.   //Your UIAlertView
  8. }