Keyboard won't dismiss when popover closes on iOS 3.2

1k Views Asked by At
- (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

1

There are 1 best solutions below

0
On

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];