Recently I learned to make custom in-app keyboards. Now I want to be able to swap between multiple custom keyboards. However, resetting the textField.inputView property does not seem to work. 
I recreated a simplified version of this problem in the following project. The UIViews represent actual custom keyboards.
import UIKit
class ViewController: UIViewController {
    @IBOutlet weak var textField: UITextField!
    override func viewDidLoad() {
        super.viewDidLoad()
        let blueInputView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 300))
        blueInputView.backgroundColor = UIColor.blueColor()
        textField.inputView = blueInputView
        textField.becomeFirstResponder()
    }
    @IBAction func changeInputViewButtonTapped(sender: UIButton) {
        let yellowInputView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 300))
        yellowInputView.backgroundColor = UIColor.yellowColor()
        // this doesn't cause the view to switch
        textField.inputView = yellowInputView 
    }
}
Running this gives what I would initially expect: a blue input view pops up.
But when I tap the button to switch to the yellow input view, nothing happens. Why? What do I need to do to get this to work?

 
    