5

I'm having some trouble with the custom keyboard extension in ios8 with the dismiss keyboard method.

I'm calling it with :

[self dismissKeyboard];

It compiles OK, but when I press my dismiss button it crashes and open the normal keyboard. In the console I can only see the next few lines:

2014-08-25 17:38:50.147 customkeyboards[2678:5567685] plugin com.customkeyboards interrupted 2014-08-25 17:38:51.248 customkeyboards[2678:5567651] viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" UserInfo=0x7a8dd4c0 {Message=Service Connection Interrupted}

I'm using ios 8 beta 6 and running it into the emulator. The same happens in the device with the lastest beta (ios5)

Nikunj
  • 655
  • 3
  • 13
  • 25
Juan Giorello
  • 333
  • 2
  • 13
  • I'm getting this error before the keyboard even loads. Looks like Xcode is crashing – Daniel Brim Sep 05 '14 at 06:09
  • Same issue here when I tap on one of my keys on the keyboard – gyurisc Oct 18 '14 at 07:51
  • get the same problem. Did you solve it? – Wizard of Kneup Nov 09 '14 at 10:27
  • Yes, sorry for the delay! the following code solved my problem! [self.view endEditing:YES]; self.inputView.frame = CGRectMake( 0, 0, 0, 0 ); self.view.frame = CGRectMake( 0, 0, 0, 0 ); [self.inputView removeFromSuperview ]; [self.view removeFromSuperview ]; for (UIView *v in [self.inputView subviews]){ [v removeFromSuperview]; } for (UIView *v in [self.view subviews]){ [v removeFromSuperview]; } [self dismissKeyboard]; – Juan Giorello Dec 04 '14 at 17:45

1 Answers1

0

For anyone with the same problem, here is the code that solved it! Good luck!

[self.view endEditing:YES];

self.inputView.frame = CGRectMake( 0, 0, 0, 0 );
self.view.frame = CGRectMake( 0, 0, 0, 0 );
[self.inputView removeFromSuperview ];
[self.view removeFromSuperview ];
for (UIView *v in [self.inputView subviews]){
    [v removeFromSuperview];
}
for (UIView *v in [self.view subviews]){
    [v removeFromSuperview];
}

 [self dismissKeyboard];
Juan Giorello
  • 333
  • 2
  • 13