title: Warning: Attempt to dismiss from view controller while a presentation or dismiss is in progress
body: <p>I almost broke my brain on this one</p>
  
  <p>Here is the error:
  Trying to show status page at the login page
  2013-06-30 20:47:53.422 MyProgram[489:907] Warning: Attempt to dismiss from view controller  while a presentation or dismiss is in progress!</p>
  
  <p>I have the following code in SCAppDelegate.m</p>
  
  <pre><code>- (void)showStatusViewController
  {
      MLStatusViewController* statusViewController = [[MLStatusViewController alloc]
                                                     initWithNibName:@"MLStatusViewController" bundle:nil];
      UIViewController *topViewCntrller = [self.navController topViewController];
      [topViewCntrller presentModalViewController:statusViewController animated:NO];
  }
  </code></pre>
  
  <p>Then I have another view controller where when a user saves data I want to move to another (status) view controller. I don't see how I can add another controller on top so my understanding is if I disband the current one and go back to SCAppDelegate method above that it should show that status page.</p>
  
  <p>This is the code in that view controller that is trying to disband/show status view controller.<code>enter code here</code></p>
  
  <pre><code>[self dismissViewControllerAnimated:YES completion:^{
      SCAppDelegate* appDelegate = [UIApplication sharedApplication].delegate;
      [appDelegate showStatusViewController];
  }];
  </code></pre>
  
  <p>I know this comes from the lack of understanding how view controllers work and I read the guide, but still can't seem to figure this out.</p>
  
  <p>I am using Facebook API to login into the app, which is adding some complexity in how to manage view controllers.</p>
  
  <p>Any ideas will be super welcome :D</p>
  
  <p>Thank you!</p>