Changing text color of datepicker

Vasily picture Vasily · Mar 23, 2015 · Viewed 28k times · Source

Is it any way to change text color of datepicker in iOS8? I've that it isn't possible in iOS7 and prior, something changed in 8th version?

For example I've found modified picker in Yahoo Weather!

enter image description here

Answer

Sylvio LeBlanc picture Sylvio LeBlanc · Mar 28, 2015

Still Works, Swift 4 Update

datePicker.setValue(UIColor.white, forKeyPath: "textColor")

This works for me.

datePicker.setValue(UIColor.whiteColor(), forKeyPath: "textColor")