title: UIImagePickerController + Cropping: what does allowEditing and what does it not?
body: <p>After reading the documentation and <a href="https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/TakingPicturesAndMovies.html" rel="nofollow noreferrer">sample code from apple</a> regarding the UIImagePickerController and after the read of many tutorials and even <a href="https://stackoverflow.com/questions/20000273/uiimagepickercontroller-with-allowsediting-doesnt-allow-panning-to-crop">Questions</a> here at Stackoverflow (<a href="https://stackoverflow.com/questions/18281099/uiimagepickercontroller-cropping">or here</a>), i came to the conclusion, that the builtin UIImagePicker is able to present a "crop window" to the User and let the user crop and move the right part of the Image he wants to use.</p>
  
  <p>But checking out these examples on iOS 7.1, there appears no cropping window. There appears nothing what let the user crop out a part of the taken image. All tests occured on real hardware (iPhone 5S), no iPhone simulator was used here because of missing camera ;)</p>
  
  <p>Also, at the delegate method "didFinishPickingMediaWithInfo" there is no entry of "UIImagePickerControllerEditedImage" in the "info"-NSDictionary. </p>
  
  <p>What i did:</p>
  
  <pre><code>    UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
  
  #if TARGET_IPHONE_SIMULATOR
      // iPhone-Simulator has no camera, just save images to the photoalbum on the simulator to use them here
      imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
  #else
      imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
  #endif
  
      imagePickerController.editing = YES;
      imagePickerController.delegate = (id)self;
      imagePickerController.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
  
  
      [self presentModalViewController:imagePickerController animated:YES];
  </code></pre>
  
  <p>and the delegate method:</p>
  
  <pre><code>-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
      UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
          // .... do something 
  }
  </code></pre>
  
  <p>At this point, only 3 Keys are available in the Dictionary with the name "info":</p>
  
  <ul>
  <li>UIImagePickerControllerOriginalImage</li>
  <li>UIImagePickerControllerMediaMetadata </li>
  <li>UIImagePickerControllerMediaType</li>
  </ul>
  
  <p>nothing else. Also, no cropping window or any similar controls appeared.</p>
  
  <p>Am i wrong with my expectation about the behaviour of the ImagePicker? At this SF-Question the user wrote <a href="https://stackoverflow.com/questions/20000273/uiimagepickercontroller-with-allowsediting-doesnt-allow-panning-to-crop">"Crop window comes up"</a>. Was the feature removed? Is the documentation outdated or am i completely wrong here?</p>
  
  <p>I also tried this code taken from another <a href="https://stackoverflow.com/questions/3088874/didfinishpickingmediawithinfo-return-nil-photo">answer to a similar question</a>:</p>
  
  <pre><code>- (void)    imagePickerController:(UIImagePickerController *)picker 
      didFinishPickingMediaWithInfo:(NSDictionary *)info 
  {
      [picker dismissViewControllerAnimated:YES completion:^{
            // Edited image works great (if you allowed editing)
          UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
            // AND the original image works great
          UIImage *originalImage = [info objectForKey:UIImagePickerControllerOriginalImage];
            // AND do whatever you want with it, (NSDictionary *)info is fine now
          UIImage *myImage = [info objectForKey:UIImagePickerControllerEditedImage];
      }];
  }
  </code></pre>
  
  <p>No cropping window appears, the key "UIImagePickerControllerEditedImage" is not present at the info-NSDictionary.</p>
  
  <p>Can someone explain me the right behaviour? Thank you very much in advance.</p>