Edit:Ok, this is weird... After doing extensive debugging, I have discovered that whilst the text fields are resigning first responder status (I can see that there is no longer a blinking bar in any), the keyboard is NOT GOING DOWN! Maybe this deserves a different question.
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.
The code is called as such: [optionsController dismissFirstResponder]; [poppoverController dismissPopoverAnimated];
I set a breakpoint in dismissFirstResponder and it is called when I expected it to be. I also checked, and all three IBOutlets are non-nil during that function call. These are the only text fields in the whole app, so I'm not sure how else to put the keyboard down.