blog
blog copied to clipboard
How to set date color in UIDatePicker in iOS 13
datePicker.setValue(UIColor.green, forKey: "textColor")
datePicker.setValue(false, forKey: "highlightsToday")
In iOS 14
if #available(iOS 14.0, *) {
datePicker.preferredDatePickerStyle = .wheels
datePicker.tintColor = UIColor.green
}
Inspect attributes
- https://developer.apple.com/documentation/objectivec/nsobject/1415656-attributekeys
Hello, iOS 16 doesn't changing todays date colour when I use the above code. Any inputs or workarounds?
Hello, iOS 16 doesn't changing todays date colour when I use the above code. Any inputs or workarounds?
hello, have you resolve this question on iOS 16?
appDelegate.window?.overrideUserInterfaceStyle = .dark my App today alaways black. when I set dark mode the today textcolor change to white