-1

Use the slide gesture to pop a view controller, and the keyboard disappears after the view controller disappears.

I want it to disappear together with the view controller like iPhone Message's keyboard.

Epic Byte
  • 33,840
  • 12
  • 45
  • 93
  • have you tried the answer provided to this question? I think it is what you are looking for. http://stackoverflow.com/questions/20984224/animate-the-keyboard-in-sync-with-the-uiview-while-edge-swiping-back-in-ios7 – FeichengMaike Aug 20 '14 at 07:35

1 Answers1

0

You need to manually hide the keyboard by calling resignFirstResponder on your textfields or whatever it is you are using to get keyboard input.

Or you can use [self.view endEditing:YES];

Whichever one you choose, you can run it in the viewWillDisappear, that way the keyboard will dismiss along with the view. For example:

- (void)viewWillDisappear:(BOOL)animated {
    [self.view endEditing:YES]; //Hides keyboard
    [super viewWillDisappear:animated];
}
Epic Byte
  • 33,840
  • 12
  • 45
  • 93