title: iOS: Changing a view on backgroung does not refresh what is being seen before the app returns to foreground
body: <p>Ok, I got this issue: I have an application with a login screen that is suposed to show everytime the app goes to background and return. The problem is, the previous screen appears for a fraction of second after the app return to foreground, because the system only refresh what is being seen after loading. What is need is a complete transition before the app returns to foreground. Yes, I am doing the transition on app delegate, at applicationDidEnterBackground. tried at every single other back/fore transition method, same results. The code works fine, but theres a flash of the screen before the login screen showing up.</p>
  
  <p>The full code is as follows:</p>
  
  <pre><code>    - (void)applicationDidEnterBackground:(UIApplication *)application
         {               
             if (!([LogicCore loadPass] == nil || [[LogicCore loadPass] isEqualToString:@""])) //a password is set, 
             {
                 [self.window.rootViewController dismissModalViewControllerAnimated:YES];//go back to the rootview, the login screen
  
             }
         }
  </code></pre>