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.
}
I guess you just need
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(refreshItems) name:UIApplicationDidBecomeActiveNotification object:nil];