Bruno Berisso
Bruno Berisso

Reputation: 1091

Keyboard hide in iPad don't work

I have many views and the problem appears in all of them. I have 'n' UITextField's in a UIView, I implement the UITextFieldDelegate method to hide the keyboard when the user press the "Done" button like this:

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
    [textField resignFirstResponder];
    return YES;
}

Nothing special. The problem is that doesn't work. The method executes without problem but the keyboard doesn't hide.

Any help?

Upvotes: 2

Views: 1124

Answers (1)

Bruno Berisso
Bruno Berisso

Reputation: 1091

The problem was that the view where the field was display was deployed as UIModalPresentationFormSheet, change it to UIModalPresentationPageSheet fix the problem.

Upvotes: 1

Related Questions