How do I check if an UIViewController is currently being displayed?
My UIViewControllers are listening for NSNotifications - e
You need to check if your viewcontroller is on top of the stack of navigationcontroller's viewcontroller array. A sample code is,
if (self.navigationController.topViewController == self) {
//the view is currently displayed
}
You can use this inside the viewWillAppear method to check whether the current view is visible.