Changing text color of datepicker

前端 未结 8 2355
鱼传尺愫
鱼传尺愫 2020-12-01 15:57

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

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 16:37

    It's working on iOS 10 only if you set both properties.

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

提交回复
热议问题