We have a photo picker made with UIImagePickerController.
When making double tap (instead of one tap) the photo from gallery.
UIImagePickerController is dismissedUIImagePickerController is dismissed and presenting view controller is dismissed as well :0Is it iOS 11 bug or we have to adjust something?
Our code:
  let vc = UIImagePickerController()
  vc.delegate = self
  vc.modalPresentationStyle = .overFullScreen
  vc.allowsEditing = false
  rootVC.present(vc, animated: true) // `rootVC` also presented modally.
Instead of self.dismiss(), use picker.dismiss()
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any])
{
    //self.dismiss(animated: true, completion: nil)
    picker.dismiss(animated: true, completion: nil)
}
This will only dismiss your picker view and not the view controller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With