I'm having the strangest issue with a tvOS app where I check self.traitCollection.userInterfaceStyle
to setup my UI according to light or dark mode in tvOS 10+.
On initial launch, all works as expected, and with the system in Light mode, UIUserInterfaceStyleLight
is returned. However, by backgrounding and foregrounding the app (going out to the Home screen and back), the app all of a sudden returns UIUserInterfaceStyleDark
. This is without changing the system appearance and even validating the system appearance remains set to Light.
Strangely enough, if I set the system to Dark then on each relaunch it returns UIUserInterfaceStyleLight
, yet on initial launch it will be the proper UIUserInterfaceStyleDark
.
What could be causing this?