title: How to remove inputAccessoryView and replace it with another view?
body: <p><strong>Here is the requirement</strong></p>
  <ul>
  <li>Basic chat app that has an input accessory view on top of keyboard in a <code>UICollectionViewController</code></li>
  <li>I add this custom input accessory view by using <code>override var inputAccessoryView</code> and I return the custom view in this function</li>
  <li>I have a requirement where I need to <strong>replace</strong> this <code>inputAccessoryView</code> with another custom input accessory view at some point for a particular functionality</li>
  </ul>
  <p><strong>What I have tried</strong></p>
  <ul>
  <li><strong>Problem 1</strong>: I tried <code>removeFromSuperView()</code> but that leaves a blank space above the keyboard equal to the height of the removed view &amp; this is probably wrong</li>
  <li><strong>Problem 2</strong>: How do I call the override method again and <strong>return</strong> another custom input accessory view?</li>
  </ul>
  <p><strong>Here is how I add the first input accessory view</strong></p>
  <pre><code>lazy var customInputAccessoryViewNumberOne: KeyboardView = {
          let civ = KeyboardView(frame: .init(x: 0, y: 0, width: view.frame.width, height: 50))
          civ.sendButton.addTarget(self, action: #selector(handleSend), for: .touchUpInside)
          return civ
      }()
  
  override var inputAccessoryView: UIView? {
          get {
               return customInputAccessoryViewNumberOne
          }
      }
  </code></pre>
  <p>Now when a user clicks on a button, I need to <strong>completely replace</strong> <code>customInputAccessoryViewNumberOne</code> with <code>customInputAccessoryViewNumberTwo</code></p>
  <pre><code>@objc func handleNewInputAccessoryViewPressed() {
    //how to remove customInputAccessoryViewNumberOne?
    //how to add customInputAccessoryViewNumberTwo?
  }
  </code></pre>