As Pavel Kaljunen said, you only need to set the inputView to zero, but when the keyboard is already visible, you first need to run the resignFirstResponder command, set the inputView to zero, and then run FirstResponder again.
[UIView beginAnimations:nil context:NULL]
[UIView setAnimationDuration:0.35]
[yourTextField resignFirstResponder]
yourTextField.inputView = nil;
[yourTextField becomeFirstResponder]
[UIView commitAnimations]
source
share