I am testing Dark Mode in iPhone 12 Pro (iOS 14.4). I enabled Dark Mode in Settings but my Keyboard remains the same. It does not appear in DarkMode.
I have 2 questions:
Do we need to write code to change the appearance of the Keyboard or OS assigns the appearance to Keyboard from Settings. (Android does this way).
If developer needs to handle the DarkMode appearance for keyboard then how can we do that?
I tried this code to change the color of the Keyboard in AppDelegate but it did not work.
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
[ConfigManager setup];
self.viewController = [[MainViewController alloc] init];
BOOL result = [super application:application didFinishLaunchingWithOptions:launchOptions];
// This is the code for changing the appearance of the keyboard
[UITextField appearance].keyboardAppearance = UIKeyboardAppearanceDark;
return result;
}
It's a Cordova based project and I am using CDVIonicKeyBoard Plugin.