pa12 pa12 - 5 months ago 37
iOS Question

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!

I tried other post in stackoverflow but did not work.

Any help would be appreciated.

Thanks

Answer

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()