TvOS Keyboard lose keyboardAppearance after minimizing

Viewed 81

I have an app with UISearchContainerViewController.

let searchController = UISearchController(searchResultsController: resultsTableController)
searchController.searchBar.keyboardAppearance = .dark
let container = UISearchContainerViewController(searchController: searchController)

Then I add it to screen. The keyboard look like intended. After that i minimize the application and expand it back. The keyboard become .light appearance. And no way to bring it back to .dark. How to fix that?

Before dark appearance

After light appearance

Looked at https://stackoverflow.com/a/28114622/5790492

1 Answers

window.overrideUserInterfaceStyle = .dark

This line in AppDelegate fixed it for me.

Related