0
- (BOOL)popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController {
    [self dismissFirstResponder];
    return YES;
}


-(void)dismissFirstResponder {
    [nameField resignFirstResponder];
    [descriptionField resignFirstResponder];
    [helpField resignFirstResponder];
 }

I have tried loads of different things, but the keyboard just isn't going down:

  1. I checked to see if my outlets were hooked up correctly in Interface Builder
  2. I put breakpoints inside the 2 methods to check they were being called at the appropriate times, and they were. Those 3 Text Fields are the only ones in the app.

What happens: The popover gets dismissed but the keyboard stays up.

I would really appreciate some help on this matter. It might be a known bug on iOS 3.2, if so any workarounds would be gratefully accepted. Thanks

Tom H
  • 1,316
  • 14
  • 26
  • Is your popover a form sheet by any chance? http://stackoverflow.com/questions/3372333/ipad-keyboard-will-not-dismiss-if-navigation-controller-presentation-style-is-fo – Kalle Aug 24 '10 at 17:24
  • No, but there is a form sheet "below" the popover. Maybe thats it, thanks. – Tom H Aug 24 '10 at 21:59
  • Actually, this seems like a more appropriate duplicate: http://stackoverflow.com/questions/2654474/ipad-popover-textfield-resignfirstresponder-doesnt-dismiss-keyboard – Tom H Aug 24 '10 at 22:01
  • From one Tom H to another, I have submitted this as a bug report to Apple, ID# 8384423 – Shaggy Frog Sep 02 '10 at 02:09

1 Answers1

0

Make sure the delegate for UITextView the UITextField is assigned

Then call the following method to dismiss any keyboard activity from the view.

[self.view endEditing:YES];
andrewoodleyjr
  • 2,971
  • 2
  • 21
  • 21