Your application can override - (void)applicationWillEnterForeground:(UIApplication *)applicationin yours UIApplicationDelegate.
You also have your controller, which will become an observer for the UIApplicationWillEnterForegroundNotification . According to Apple Docs: published shortly before the application leaves the background state on its way to becoming an active application.
NIB, - (id)init:
- (void)awakeFromNib {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(wakeUp:) name:UIApplicationWillEnterForegroundNotification object:nil];
}
- (void)wakeUp:(NSNotification *)pNotification {
NSLog(@"Name: %@", [pNotification name]);
NSLog(@"Object: %@", [pNotification object]);
NSLog(@"I am waking up");
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}