how to call a method when application goes background and changes some activity like the time or date of mobile and come to foreground (application active mode).
Then i want to call a method in UIViewController classes
FirstViewController Class Method.
-(void)refreshItems{
// Your item refresh code.
}
Check this code (if FirstViewController is window's rootViewController else take instance of FirstViewController in AppDelegate and check null)
in Objective-C