Having trouble to find out a solution for changing the color of text for the selected Date in iOS 13 dark mode.
I know how to change the color of the text of a UIPicker view using code
self.timePicker.setValue(UIColor.black, forKeyPath: "textColor")
OR using User Defined Runtime Attributes. But nothing is working for changing the selected date color for iOS 13 Dark mode. With background white color and black text color, my date picker-view looks like this:
So with changing the text color black, does not change the selected date text color. It changes all the other text color to black; but not the selected one. Selected one stays white, which is default for dark mode.
You can set self.window
inside AppDelegate.m
and override Interface style like so
if (@available(iOS 13, *)) {
self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
}
return YES;
Swift 5.*
if #available(iOS 13.0, *) {
self.window?.overrideUserInterfaceStyle = .light
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With