i have one bool variable isValidSession i want to observer this variable in whole application whenever it becomes false it will automatically call method and renew the session.
override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutablePointer<Void>) {
if let newValue = change?[NSKeyValueChangeNewKey] {
}
}