-1

I'm very new to Swift and XCode. I can't find an option in the attributes box to change the text colour of the UIDatePicker. I want it white so it shows up on dark background.

1 Answers1

0

use this code

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

it change your datePicker text color to white if you want change to another color just replace your color with UIColor.white

Masoud Roosta
  • 455
  • 9
  • 19