UISegmentedControl always in Dark Mode?

My app has always been in a dark mode. Now that iOS 13 is imminent I plan to add a light mode at some time in the future but haven't got the time now.


I recompiled and ran the app on iOS 13 and the segmented controls are unusable in light mode but look ok in dark mode. I can change the colours to make them usable in light mode but the result looks hideous - a mostly light control on a dark background.


Is there some way to make segmented controls always appear as if they were in dark mode even if the phone is in light mode? I have looked around these forums and the web, and there seem to be a few hacks, but even then nothing that works for segmented controls with images.


At the moment the easiest solution seems to be to write my own segmented control, which is far from ideal.

Accepted Reply

After further investigation I found out this is possible by setting overrideUserInterfaceStyle on view controllers to force dark mode. Whew.

Replies

After further investigation I found out this is possible by setting overrideUserInterfaceStyle on view controllers to force dark mode. Whew.