Reputation: 1
How would I go about changing the color of the text in a UIDatePicker? I would prefer not to use UIPickerView as I don't want to deal with the implementation of the date/time aspect of it, however, if there exists a prewritten implementation of the equivalent of a UIDatePicker as a UIPickerView, I would be open to it.
Note, I am using Swift 5.
Upvotes: 0
Views: 88
Reputation: 295
Still Works, Swift 5 Update
datePicker.setValue(UIColor.white, forKeyPath: "textColor")
This works for me.
datePicker.setValue(UIColor.whiteColor(), forKeyPath: "textColor")
Upvotes: 1