I want to reload data in UIViewController when application become active or become foreground.
I know applicationDidBecomeActive is called in AppDelegate class.
But I have to have a global variable for the UIViewController to reload its data in AppDelegate class like this code:
// global variable
At the time of reactivation, if you want to carry a particular thing for a view controller, you should register a notification in its
UIApplicationDidBecomeActiveNotification will automatically notify your application and given controller, if they registered for it.
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(yourMethod) name:UIApplicationDidBecomeActiveNotification object:nil];