Created
October 24, 2016 08:28
-
-
Save sauvikatinnofied/95a07994c4ec72ae462e4469929c37de to your computer and use it in GitHub Desktop.
Medium Blog Post Gist
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
extension ViewController: NetworkStatusListener { | |
func networkStatusDidChange(status: Reachability.NetworkStatus) { | |
switch status { | |
case .notReachable: | |
debugPrint("ViewController: Network became unreachable") | |
case .reachableViaWiFi: | |
debugPrint("ViewController: Network reachable through WiFi") | |
case .reachableViaWWAN: | |
debugPrint("ViewController: Network reachable through Cellular Data") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment