cordova-plugin-ionic-keyboard
cordova-plugin-ionic-keyboard copied to clipboard
iOS 13 Dark Mode issues
KeyboardStyle will be Light from next time when you open the keyboard with APPEARANCE set to Dark on iOS 13. It is probably because keyboardStyle is overwritten by onKeyboardWillShow.
- (void)onKeyboardWillShow:(NSNotification *)note
{
if (hideTimer != nil) {
[hideTimer invalidate];
}
CGRect rect = [[note.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
double height = rect.size.height;
if (self.isWK) {
double duration = [[note.userInfo valueForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue];
[self setKeyboardHeight:height delay:duration+0.2];
[self resetScrollView];
}
if (self.keyboardStyle) { // <---------This check--------------
[self setKeyboardStyle:self.keyboardStyle];
}
NSString *js = [NSString stringWithFormat:@"Keyboard.fireOnShowing(%d);", (int)height];
[self.commandDelegate evalJs:js];
}