Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 662
pa12 Avatar asked Oct 16 '12 16:10

pa12


2 Answers

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()
like image 107
Oscar Gomez Avatar answered Nov 15 '22 17:11

Oscar Gomez


Use this one instead:

-reloadInputViews (UIResponder)
like image 21
yoooriii Avatar answered Nov 15 '22 18:11

yoooriii