ok , well that's how you do it directly form the documentation copy and pasted.. So.. problem must lie elsewhere.. did you create the outlets and declare them in your .h?
I'm pretty sure you want it in the view class not the controller but you got me
Yes, same problem for me. It works when implemented in the view class, but I need it to execute a method from the controller. Please someone with an idea?
To hide a keyboard u need just to setup a callback (i.e. IBAction) for the event "Did End On Exit" of UITextField in the InterfaceBuilder. So make ur UITextField an IBOutlet and put an empty IBAction as a callback for "Did End On Exit". That's all.
Can Somebody tell me how to dismiss keyboard on click of UITextField
Can Somebody tell me how to dismiss keyboard on click of UITextField which i created in interface builder because i want to select data from the UIPickerView to fill the UITextField instead of typing the text from the keyboard
Quote:
Originally Posted by incorrect.user
To hide a keyboard u need just to setup a callback (i.e. IBAction) for the event "Did End On Exit" of UITextField in the InterfaceBuilder. So make ur UITextField an IBOutlet and put an empty IBAction as a callback for "Did End On Exit". That's all.
Can Somebody tell me how to dismiss keyboard on click of UITextField
Can Somebody tell me how to dismiss keyboard on click of UITextField which i created in interface builder because i want to select data from the UIPickerView to fill the UITextField instead of typing the text from the keyboard
Can Somebody tell me how to dismiss keyboard on click of UITextField which i created in interface builder because i want to select data from the UIPickerView to fill the UITextField instead of typing the text from the keyboard
There is an attribute editable for text field which can be set through attribute inspector
deselect this attribute
this will make sure that text inside text field can not be modified by user.
I have created UIPickerView using interface builder and i want to load this when the user clicks on UITextField, every time i click on UiTextField Keyboard pops up but i dont see UIPickerView loading from NSBundle can help me on this
I have created UIPickerView using interface builder and i want to load this when the user clicks on UITextField, every time i click on UiTextField Keyboard pops up but i dont see UIPickerView loading from NSBundle can help me on this
Thanks in advance
I simply point the Did End On Exit to a dummy piece of code.
I have created UIPickerView using interface builder and i want to load this when the user clicks on UITextField, every time i click on UiTextField Keyboard pops up but i dont see UIPickerView loading from NSBundle can help me on this
Thanks in advance
Refer methods of text field delegate in Apple Doc.....
find out method which causes keyboard to pop up.
in that method you can load UIPickerView from NIB file.
I try to repeat example into First Steps manual, but i can't understand how to hide keyboard when you press the button Done.
here is my code in "MyViewController.h"
then, connect in the IB's inspector for the textfield the 'did end on exit' option and connect it to the 'dismissKeyboard'.
Also, I believe it's also possible to do it with a delegate so you do not need to connect anything, but I'm not sure and have to look that one up.
(I think it had something to do with the <UIApplicationDelegate> protocol....)
But don't take my word for that one....yet..