Created
October 20, 2017 14:39
-
-
Save stfalconaleks/6dbdf5b1c62d3752ac334fe31dbc381d to your computer and use it in GitHub Desktop.
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
//internet connection | |
UHBConnectivityManager.shared().registerCallBack({ [weak self] (status: | |
ConnectivityManagerConnectionStatus) in | |
if status == ConnectivityManagerConnectionStatusConnected { | |
print("Internet connected") | |
SocketManager.sharedInstance.reconnect() | |
self?.alertVC.dismiss(animated: true, completion: nil) | |
} else { | |
print("No connection") | |
SocketManager.sharedInstance.closeConnection() | |
VCManager.sharedInstance.topViewController()?.present((self?.alertVC)!, animated: true, completion: nil) | |
} | |
}, forIdentifier: self.memoryAddress()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment