Created
February 13, 2020 13:22
-
-
Save greggjaskiewicz/304c94fab432cf01203faab01189ffca to your computer and use it in GitHub Desktop.
reachability changed notification network status convenience unwrapped
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
+ (GCNetworkReachabilityStatus)statusFromNotification:(NSNotification *)notification { | |
NSNumber *statusNumber = notification.userInfo[kGCNetworkReachabilityStatusKey]; | |
if (statusNumber == nil) { | |
return GCNetworkReachabilityStatusNotReachable; | |
} | |
GCNetworkReachabilityStatus status = [statusNumber intValue]; | |
return status; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment