Search code examples
iphoneiosipaduitextfield

switching inputview for uitextfield


I am making a custom input view for my textfield in textFieldDidBeginEditing method using

textField.inputView =wView;

There is button using which I want to get back the keyboard instead of my custom input view. Any idea how to do that.

If there is no other go I wanted to try with resigning textfield as first responder and make it first responder again. But this would really complicate my project. I wanted to know if there is any other way.


Solution

  • Things have changed quite a bit, since I wrote this answer way back in 2012, the recommended approach as mentioned by @yoooriii is:

    myTextField.inputView = nil
    myTextField.reloadInputViews()