'Change compact date picker text color. Always black
I have inserted a UIDatePicker in .compact
format, only date, in Swift.
I have done several tests and read many posts but I can not change the color of the text which always remains black.
pickerInizio.setValue(UIColor.red, forKey: "textColor")
pickerInizio.tintColor = UIColor.lightGray
How can I change the DatePicker's text color when using UIDatePickerStyleCompact?
Xcode 13, iOS 14/15
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|