Along with messages applicationDidBecomeActive:and applicationWillEnterForeground:sent to the application delegate, the OS will also send corresponding notifications UIApplicationDidBecomeActiveNotificationand UIApplicationWillEnterForegroundNotification.
You may have your view controller to listen to these notifications:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(appWillEnterForegroundNotification:)
name:UIApplicationWillEnterForegroundNotification
object:nil];
Remember to shoot yourself as an observer before your controller is destroyed.
source
share