Created
September 27, 2014 16:29
-
-
Save paulfarino/0e32e1587852d26020ee to your computer and use it in GitHub Desktop.
Reachability API Conditional Statement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reachability * networkReachability = [Reachability reachabilityForInternetConnection]; | |
NetworkStatus networkStatus = [networkReachability currentReachabilityStatus]; | |
if (networkStatus == NotReachable) { | |
NSLog(@”There Is NO internet connection”); | |
// show no connection view | |
} else { | |
NSLog(@”There IS internet connection”); | |
// show connected view | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment