###Usage
override func viewDidLoad() {
super.viewDidLoad()
// MARK: Start Monitoring For Network Reachability Changes.
SSASwiftReachability.sharedManager?.startMonitoring()
// MARK: Listen For Network Reachability Changes
NSNotificationCenter.defaultCenter().addObserver(self, selector: "reachabilityStatusChanged:", name: reachabilityDidChangeNotification, object: nil)
}
func reachabilityStatusChanged(notification: NSNotification) {
guard let userInfo = notification.userInfo else { return }
guard let statusItem = userInfo[SSAReachabilityNotificationStatusItem] as? String else { return }
print(statusItem)
}
###Installation As for now please clone the repository and drag the source folder into your project to use SSASwiftReachability. (Cocoapods & Carthage support coming soon)
###Author
Sebastian Andersen
Inspired by AFNetworkReachabilityManager
###License
SSASwiftReachability is available under the MIT license. See the LICENSE file for more info.