How to force Dark appearance on SearchBar ?

This is what I want it to look like.

Background color is black and text tint color is white.

You can see "Hold to dictate search" message as placeholder of search bar.

I would like to force this dark appearance even if user is in light mode.


This is the code which was working on tvOS9.

```

searchController.searchBar.keyboardAppearance = .Dark

searchController.view.backgroundColor = .blackColor()

```


Now it looks like this on tvOS10 light mode.



You can't really see that placeholder anymore.

It's there, but tint color is gray or similar value.


Is there any solution for this ?

Answered by toshi0383 in 192744022

This issue has been resolved in tvOS10.1 beta.


> When a search keyboard is configured to be explicitly dark, The “Hold to dictate search” text no longer appears in a dark color.

Accepted Answer

This issue has been resolved in tvOS10.1 beta.


> When a search keyboard is configured to be explicitly dark, The “Hold to dictate search” text no longer appears in a dark color.

Does it work with tvOS 13.

I saw some bug with this usage, when I minimized our app to tray, dark mode disappear when restore from tray, and I can't see any characters button in search field :(


How to force Dark appearance on SearchBar ?
 
 
Q