title: UIImagePickerControllerEditedImage edited image offset for iOS 11
body: <p>I'm using a <code>UIImagePickerController</code> with <code>allowsEditing</code> enabled to share images in an App, but found that cropped image is offset for devices running iOS 11 only.</p>
  
  <p>My <code>UIImagePickerControllerDelegate</code> implementation is quite simple, just standard actions:</p>
  
  <pre class="lang-swift prettyprint-override"><code>func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
      let image = info[UIImagePickerControllerEditedImage] as! UIImage
  
      imageView.image = image
      picker.dismiss(animated: true, completion: nil)
  }
  </code></pre>
  
  <p>Below you can see difference. iOS 10 on the right, iOS 11 on the left. You can see the iOS 11 image is offset down, even though the cropping rectangle was put in exactly the same place.</p>
  
  <p><a href="https://i.stack.imgur.com/q1Pds.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/q1Pds.jpg" alt="iOS 10 vs iOS 11 edited image"></a></p>
  
  <p>Here is a video demonstrating the issue: <a href="https://www.dropbox.com/s/4csofidjcrc9ah6/UIImagePickerControllerEditedImageOffset.mp4?dl=0" rel="noreferrer">https://www.dropbox.com/s/4csofidjcrc9ah6/UIImagePickerControllerEditedImageOffset.mp4?dl=0</a></p>
  
  <p>I also created a demo project on GitHub to demonstrate the issue: <a href="https://github.com/aivars/photo-Picker-Tests" rel="noreferrer">https://github.com/aivars/photo-Picker-Tests</a></p>
  
  <p>I would guess that it is <code>UIImagePickerController</code> bug, but wonder why do not find any other error reports online.</p>
  
  <p>I also filed a bug report with Apple: <a href="http://www.openradar.me/36292067" rel="noreferrer">http://www.openradar.me/36292067</a></p>