title: Wrong keyboard Y-position
body: <p>I add my CustomView in ViewController. I Use this method:</p>
  
  <pre><code>func showCreateProfileAlert() {
              let screenHeight = UIWindow().screen.bounds.height
              let screenWidth = UIWindow().screen.bounds.width
  
              //Alert
              let alert = CreateNewJobProfile.instanceFromNib()
              let height = (self.view.bounds.height + 94) - self.view.bounds.height
              let frame = CGRect(x: 8, y: height, width: self.view.bounds.width - 16, height: 200)
              alert.frame = frame
              self.createProfileView = alert
  
              UIView.animate(withDuration: 0.2) {
                  self.view.addSubview(alert)
              }
      }
  </code></pre>
  
  <p>CustomView has UIImageView with Tap gesture and UITextField. Gesture calling method for present modal UIImageViewController:</p>
  
  <pre><code>func photoFromLibrary() {
          imagePicker.allowsEditing = true
          imagePicker.sourceType = .photoLibrary
          imagePicker.mediaTypes = UIImagePickerController.availableMediaTypes(for: .photoLibrary)!
          self.present(self.imagePicker, animated: true, completion: nil)   
      }
  </code></pre>
  
  <p>Keyboard has right position on bottom screen.
  If dismiss UIImagePickerController, keyboard has wrong Y-Position.</p>
  
  <p>UIImagePickerController delegate method:</p>
  
  <pre><code>func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
          self.dismiss(animated: true, completion: {
             //Create and show alert again
             self.showCreateProfileAlert()
          })
      }
  </code></pre>
  
  <p>This top screen, when keyboard hided:</p>
  
  <p><a href="https://i.stack.imgur.com/Q79WO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q79WO.png" alt="enter image description here"></a></p>
  
  <p>Keyboard frame when show:
  (-207.0, -271.0, 414.0, 271.0)</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I created simple UIViewController with UIImageView and UITextfield and got this bug again.
  I just present modal UIImagePickerController. </p>