How can I dismiss keyboard in iPhone OS 3.2 with text field in popover?
Posted
by Tom H
on Stack Overflow
See other posts from Stack Overflow
or by Tom H
Published on 2010-06-05T10:49:56Z
Indexed on
2010/06/05
10:52 UTC
Read the original article
Hit count: 307
I have several text fields in a custom uiviewcontroller subclass, which is displayed within a popover. The popover is displayed form a bar button. I want the keyboard to go down when the popover is dismissed (either by the user tapping the bar button again, or tapping outside the popover. From the view controller that displays the popover, when the popover is dismissed, in either of the 2 fashions, I call
[optionsController dismissFirstResponder];
Optionscontroller is the uiviewcontroller subclass in the popover. Dismissfirstresponder is a method I defined:
-(void)dsimissFirstResponder {
[nameField resignFirstResponder];
[descriptionField resignFirstResponder];
[helpField resignFirstResponder];
}
Those are three IBoutlets which I connected in the xib to the text fields.
That doesn't work. Any help with this would be greatly appreciated.
© Stack Overflow or respective owner