title: Presenting a modal view controller after dismissing another
body: <p>After a user selects a picture from their photo library I want to dismiss the imagePickerVierController and present another, but get the error:</p>
  
  <p>Warning: Attempt to dismiss from view controller  while a presentation or dismiss is in progress!</p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
  
  {
  if (!self.submitPicturesDetailsViewController)
  {
      self.submitPicturesDetailsViewController = [[SubmitPictureDetailsViewController alloc] initWithPicture: lPicture];
  }
  if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
  {
      [self.submitPicturesDetailsViewController setModalPresentationStyle:UIModalPresentationFormSheet];
      [self.popOver dismissPopoverAnimated:YES];
      [self presentViewController: self.submitPicturesDetailsViewController animated:YES completion: nil];
  }else
  {
      //[self performSelector:@selector(present) withObject: nil afterDelay: 5.0];
      [self dismissViewControllerAnimated:NO completion:^{
          [self presentViewController: self.submitPicturesDetailsViewController animated:YES completion: nil];
      }];
  }
  }
  </code></pre>
  
  <p>I have tried:</p>
  
  <pre><code>[self performSelector:@selector(present) withObject: nil afterDelay: 5.0];
  </code></pre>
  
  <p>And it works properly so apparently the completion block is not working properly.</p>