0

On a class that subclasses ABNewPersonViewController in edit mode, I am loading a transparent view(xib file).

When I am doing some edits, the keyboard pops up and even after I am loading the next view, the keyboard won't dismiss.

Where should I be resigning the first responder?

enter image description here

Xavi Valero
  • 2,047
  • 7
  • 42
  • 80

3 Answers3

1

You need to resign it when your view is dissapearing, for example in:

-(void)viewWillDisappear:(BOOL)animated{

[myTextView resignFirstResponder];

}
Antonio MG
  • 20,382
  • 3
  • 43
  • 62
0

The easiest way is to call endEditing on the view.

edsko
  • 1,628
  • 12
  • 19
0

Assign UITextFieldDelegate and write this method to resign your keyboard

-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [TextFieldName resignFirstResponder];

    return YES;
}

Hope this may help you.Thanks!!

Kiran
  • 339
  • 1
  • 14