title: Keyboard (numpad) toolbar working but not showing
body: <p>I tried to add a toolbar for my UITextFiled, the keyboard is set to numpad. It is working but the button is not showing. I created an extension for my UITextfield</p>
  <pre><code>extension UITextField {
  
  /// Adding a done button on the keyboard
  func addDoneButtonOnKeyboard() {
      let doneToolbar = UIToolbar(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 50))
      doneToolbar.barStyle = .default
  
      let flexSpace = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
      let done = UIBarButtonItem(title: &quot;Done&quot;, style: .done, target: self, action: #selector(self.doneButtonAction))
  
      let items = [flexSpace, done]
      doneToolbar.items = items
      doneToolbar.sizeToFit()
  
      self.inputAccessoryView = doneToolbar
  }
  
  /// Done button callback
  @objc func doneButtonAction() {
      self.resignFirstResponder()
  }
  </code></pre>
  <p>}</p>
  <p>and then I am calling this extension like this</p>
  <pre><code>private lazy var fromInputField: CoinpassInput = {
          let input = CoinpassInput()
          input.keyboardType = .decimalPad
          input.addTarget(self, action: #selector(fromInputFieldDidChange), for: .editingChanged)
          input.addDoneButtonOnKeyboard()
          return input
      }()
  </code></pre>
  <p>the toolbar is showing and working but the 'done; button is not showing. If I click on the right corner of the toolbar. the keyboard will hide. I dont know what I am missing why the button is not showing.</p>
  <p><a href="https://i.stack.imgur.com/uIO9E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uIO9E.png" alt="enter image description here" /></a></p>