title: Present another modal view from UIImagePickerController
body: <p>I want to add a confirmation view after the user takes a photo or selects a saved photo. The confirmation view will just show the selected image, with a cancel and upload button in a toolbar.</p>
  
  <p>My UIImagePickerController is presented modally from one of my view controllers, which is controlled by a navigation controller, which is in turn controlled by a tab bar controller.</p>
  
  <p>How do I present my confirmation view modally so that it takes up the full screen (like the image picker view) when the user selects a photo? Ideally, I want something like this:</p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
      [picker dismissModalViewControllerAnimated:YES];
      UIViewController *modal = [[UIViewController alloc] init];
      modal.view = confirmationView;
      [self presentModalViewController:modal animated:YES];
      [modal release];
  }
  </code></pre>
  
  <p>However, that crashes the app. Should I be presenting the the confirmation view modally from the PICKER? If so, how do I make sure that when the confirmation view is dismissed, the picker will not be displayed either?</p>
  
  <p>EDIT:</p>
  
  <p>Fixed the bug in the code I posted. That's what happens when I try to type from memory instead of copy+paste :( Anyways, the suggestions so far don't help.</p>
  
  <p>If I present the modal controller THEN dismiss the picker, nothing happens, presumably since both controllers are subsequently dismissed.</p>
  
  <p>If I dismiss the picker THEN present the modal controller, I get an exception about modal transitions:</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempting to begin a modal transition from &lt;UINavigationController: 0x6b33940&gt; to &lt;UIViewController: 0x6b62b00&gt; while a transition is already in progress. Wait for viewDidAppear/viewDidDisappear to know the current transition has completed'
  </code></pre>