title: How to center UITabButtonItem in the middle of the screen programatically?
body: <p>I am trying to move the DONE button in the middle.
  <a href="https://i.stack.imgur.com/NiyfJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NiyfJ.png" alt="enter image description here"></a></p>
  
  <p>Initially, it is located on the left side:</p>
  
  <pre><code>let doneButton = UIBarButtonItem(title: "Done", style: .done, target: self, action: #selector(ViewController.dismissKeyboard))
  
      toolBar.setItems([doneButton], animated: false)
      toolBar.isUserInteractionEnabled = true
  </code></pre>
  
  <p>Do you have an idea about how to move it to the middle of the screen programmatically? I tried to add flexible space but it doesn't work.</p>