Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含创建时间的文件列表,我想在 NSDataPickerView 中将其显示为不同的颜色。像这样我怎样才能做到这一点?我试过self.datePicker.textColor = NSColor.redColor()了,但它不起作用。
self.datePicker.textColor = NSColor.redColor()
下面的作品 self.datePicker.backgroundColor = NSColor.yellowColor()
尝试这个 :
self.datePicker.setValue(NSColor.redColor(), forKey: "textColor")
我不确定,它是否适用NSDatePicker,但它适用于UIDatePicker!
NSDatePicker
UIDatePicker