IOS keyboard color changes - keyboardAppearance dark color doesn't stick

In our application, we set the keyboard Appearance dark. This creates a black keyboard, as expected. However, if the keyboard is displayed, and we press the "Home" button, and then return to the application, the keyboard turns white, as shown in the figure. Any ideas why?

wrong colored dark keyboard

+7
ios cocoa-touch uikit uiview keyboard
source share
1 answer

Perhaps this is due to the fact that the keyboard is a global object. There is only one keyboard in memory at any given time. In addition, the OS will automatically change the color of the keyboard based on the background. So your setup is probably just getting overridden. I would suggest hiding the keyboard when your application enters the background, and then re-display it when it reappears in the foreground. Then, when you repeatedly show the keyboard, reset the keyboard appearance through the code.

+2
source share

All Articles