I do a new post because I have a problem that I can’t find the respons on the internet. I’m working with a bluetooth barcoder with a clean view without any viewable textfields. To catch the information of the barcoder I use a hidden textfield and works fine. The problem is when the Barcoder disconnects it appears the keyboard because a field is the first responder. I don’t want to resign that field but I don’t want the keyboard appears.
I have a function that catch when the keyboard will appear:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector (keyboardWillShow:)
name: UIKeyboardWillShowNotification object:nil];
What I want is to stop the event of the keyboard or if not’s possible hide it when appears. Any ideas about it? Any help will very usefull…
Thanks guys!
Dhilip’s answer may work for you. If it doesn’t here are some alternatives:
1) set the textField.enabled property to NO.
2) Subclass UITextField and return nil for the inputView:
If you use your custom textfield class instead of a regular UITextField, it works the same except that you’ve said to use nil for it’s keyboard instead of UIKeyboardView (which is the default).