I'm using Reachability in my swift project. I had below code in AppDelegate
NSNotificationCenter.defaultCenter().addObserver(self, selector: "reachabilityChanged:", name: ReachabilityChangedNotification, object: reachability)
reachability.startNotifier()
It does call
func reachabilityChanged(note: NSNotification) {
}
But my problem is that, it is being called for all the request. That is, I'm loading images from the server, so when network reachability get's change this is method get's call for all the request. I want that this method should be called only once.
I had also tried to add this notification and method in ViewController, but it didn't work.
Any help will be appreciated. Thanks in advance