I\'ve been having trouble trying to set the UIDatePicker font and color. Everything else in my app was fairly straightforward to adjust except
UIDatePicker
This worked for me:
setting text color for all date picker subviews
for view in datePicker.subviews { view.setValue(UIColor.white, forKeyPath: "textColor") }