According to iOS Application Programming Guide :
Returning to the forefront, your applications can restart the tasks that it stopped when it moved to the background. The steps that occur when moving to the foreground are shown in Figure 3-6. The applicationWillEnterForeground: method should undo everything that was done in your application. The DidEnterBackground: method and the applicationDidBecomeActive: method should continue to execute the same that will be executed at startup .
Have you tried to reapply your settings in the applicationDidBecomeActive: method instead of applicationWillEnterForeground: :?
Another thing to consider is working with notifications:
In the applicationDidBecomeActive: or applicationDidBecomeActive: AppDelegate methods, you can tell your application delegate to send notifications to your controllers:
- (void)applicationDidBecomeActive:(UIApplication *)application {
After that, the view controller can register for these notifications (for example, in their init method):
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(loadSettings) name: @"didBecomeActive" object: nil];
This way, your controller knows that the application has just become active and can execute any method you want.
In this example, you are telling your view controller to execute the loadSettings method when it receives a didBecomeActive notification (which was sent by the application delegate).
Mutix source share