I had a method of changing the UIDatePicker
's text color on versions of iOS before 10, but with iOS10 those solutions no longer appear to work. How could I restore the ability to change the textColor
for a UIDatePicker
?
if #available(iOS 10.0, *) {
//Not sure of a way to do something similar here.
} else {
//The following lines change the textColor of UIDatePicker to white in iOS9 and older.
self.setValue(UIColor.white, forKey: "textColor")
self.sendAction(Selector("setHighlightsToday:"), to: nil, for: nil)
}