title: UIImagePickerController does not show edit screen
body: <p>I'm playing around with a cameraOverLayView and encountered a weird behavior.   Before presenting the UIImagePickerController, I set allowsEditing to YES.   After the capture screen comes up, I tap on a button that triggers takePicture().    Instead of presenting the editing screen, the delegate method didFinishPickingMediaWithInfo() gets called right away.   Can anyone help me figure out what I could be doing wrong?   I pasted some of my code below...</p>
  
  <p>Thanks!</p>
  
  <pre><code>    - (BOOL)shouldStartCameraController {
  
      if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] == NO) {
          return NO;
      }
  
      CGSize screenSize = [[UIScreen mainScreen] bounds].size;
      float overlayOffset = 0;
  
      if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
          if (screenSize.height &gt; 480.0f) {
              overlayOffset = 195;
          } else {
              overlayOffset = 103;
          }
      } else {
          /*Do iPad stuff here.*/
      }
  
  
      UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init];
      if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]
          &amp;&amp; [[UIImagePickerController availableMediaTypesForSourceType:
               UIImagePickerControllerSourceTypeCamera] containsObject:(NSString *)kUTTypeImage]) {
  
          cameraUI.mediaTypes = [NSArray arrayWithObject:(NSString *) kUTTypeImage];
          cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera;
  
          if ([UIImagePickerController isCameraDeviceAvailable:UIImagePickerControllerCameraDeviceRear]) {
              cameraUI.cameraDevice = UIImagePickerControllerCameraDeviceRear;
          } else if ([UIImagePickerController isCameraDeviceAvailable:UIImagePickerControllerCameraDeviceFront]) {
              cameraUI.cameraDevice = UIImagePickerControllerCameraDeviceFront;
          }
  
      } else {
          return NO;
      }
  
  
      UIView *cameraOverlayView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, cameraUI.view.frame.size.width, cameraUI.view.frame.size.height)];
      UIImageView *cameraOverlayImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iphone5_camera_overlay.png"]];
      cameraOverlayImageView.frame = CGRectMake(0, 0, cameraUI.view.frame.size.width, cameraUI.view.frame.size.height);
      [cameraOverlayView addSubview:cameraOverlayImageView];
  
  
      UILabel *cameraLabel = [[UILabel alloc] initWithFrame:CGRectMake( 0.0f, self.view.bounds.size.height-overlayOffset, self.view.bounds.size.width, 50.0f)];
      [cameraLabel setTextAlignment:NSTextAlignmentCenter];
      [cameraLabel setBackgroundColor:[UIColor clearColor]];
      [cameraLabel setTextColor:[UIColor whiteColor]];
      [cameraLabel setShadowColor:[UIColor colorWithWhite:0.0f alpha:0.300f]];
      [cameraLabel setShadowOffset:CGSizeMake( 0.0f, -1.0f)];
      [cameraLabel setFont:[UIFont boldSystemFontOfSize:18.0f]];
      [cameraOverlayView addSubview:cameraLabel];
  
      UIButton *cancelButton = [UIButton buttonWithType:UIButtonTypeCustom];
      [cancelButton addTarget:self action:@selector(cancelButtonPressed:) forControlEvents:UIControlEventTouchDown];
      [cancelButton setFrame:CGRectMake(10, cameraOverlayView.frame.size.height-60, 50, 50)];
      [cancelButton setBackgroundColor:[[UIColor whiteColor] colorWithAlphaComponent:0.5f]];
      [cameraOverlayView addSubview:cancelButton];
  
  
      UIButton *snapButton = [UIButton buttonWithType:UIButtonTypeCustom];
      [snapButton addTarget:self action:@selector(takePictureButtonPressed:) forControlEvents:UIControlEventTouchDown];
      [snapButton setFrame:CGRectMake(110, cameraOverlayView.frame.size.height-60, 100, 50)];
      [snapButton setBackgroundColor:[[UIColor whiteColor] colorWithAlphaComponent:0.5f]];
      [cameraOverlayView addSubview:snapButton];
      cameraUI.allowsEditing = YES;
      cameraUI.showsCameraControls = NO;
      cameraUI.delegate = self;
      self.imagePickerController = cameraUI;
  
      [self presentModalViewController:cameraUI animated:YES];
  
      return YES;
  }
  
  
  - (void)handleGesture:(UIGestureRecognizer *)gestureRecognizer {
      [self shouldPresentPhotoCaptureController];
  }
  
  #pragma mark - UIBarButton Selectors
  
  - (void)takePictureButtonPressed:(id)sender {
      NSLog(@"takePictureButtonPressed...");
      // TODO: take picture!
      [self.imagePickerController takePicture];
  
  }
  </code></pre>