title: Barbuttons are moving off the position
body: <p>Everything is fine until I present a <code>uialertcontroller</code>. When i present it,the <code>barbutton</code>s are moving down from thier position.</p>
  
  <p><a href="https://i.stack.imgur.com/K3une.png" rel="nofollow noreferrer">Before presenting,everything was fine with <code>barbuttons</code></a></p>
  
  <p><a href="https://i.stack.imgur.com/cRxFf.png" rel="nofollow noreferrer">When i present an alert,you can see the <code>UIBarButtonItem</code>s are off their position</a></p>
  
  <p>Code for creating <code>barbuttonitem</code>s::</p>
  
  <pre><code>let editBtn:UIBarButtonItem = UIBarButtonItem(image: UIImage(named: IMAGE_EDIT_ICON), style: .plain, target: self, action: #selector(handleEditAction))
  self.navigationItem.rightBarButtonItem = editBtn
  </code></pre>
  
  <p>Presenting <code>UIAlertControlelr</code> as follows:</p>
  
  <pre><code>let alertController = UIAlertController(title: "Reset Password", message: "Please enter current password and create new password", preferredStyle: .alert)
     let okAction =  UIAlertAction(title: "Confirm", style: .default, handler: { [weak alertController] (_) in
     })
  
  
  let cancelAction = UIAlertAction(title: "Cancel", style: .default) { (_) in }
  
  
  alertController.addAction(cancelAction)
  alertController.addAction(okAction)
  
  
  
  okAction.isEnabled = false
  
  
  alertController.addTextField { (textField) in
      textField.placeholder = "Current Password"
      }
  
  
  }
  alertController.addTextField { (textField) in
      textField.placeholder = "New Password"
      }
  
  
  }
  alertController.addTextField { (textField) in
      textField.placeholder = "Confirm Password"
      textField.isSecureTextEntry = true
      NotificationCenter.default.addObserver(forName: NSNotification.Name.UITextFieldTextDidChange, object:textField,
                                             queue: OperationQueue.main) {
                                              (notification) -&gt; Void in
                                              self.validateResetPassword(alertController: alertController,okAction: okAction)
      }
  
  
  
  }
  
  self.present(alertController, animated: true, completion: nil)
  </code></pre>
  
  <p>Can someone help me to fix this.
  Thanks in advance</p>