Use this:
UIView *dummyView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)]; myTextField.inputView = dummyView;
It works for UITextField and UITextView, and they should be editable.
What have you done here:
You created a dummy view width=hight=0 and assigned it as the inputView of your textField .
How it works: Instead of showing the default keyboard, the viewController now shows the DummyView as an inputView for your UITextField . Since DummyView has Width=height=0 , you will not see anything on the screen :)
source share