Still Works, Swift 4 Update
datePicker.setValue(UIColor.white, forKeyPath: "textColor")
This works for me.
datePicker.setValue(UIColor.whiteColor(), forKeyPath: "textColor")
More Related Contents:
- creating custom tableview cells in swift
- Setting device orientation in Swift iOS
- Changing the Status Bar Color for specific ViewControllers using Swift in iOS8
- JavaScript synchronous native communication to WKWebView
- How to display an activity indicator with text on iOS 8 with Swift?
- How to load URL in UIWebView in Swift?
- Swift presentViewController
- Use Cocoapods with an App Extension
- Xcode: Using custom fonts inside Dynamic framework
- Swift alternative to performSelectorOnMainThread
- Changing cell background color in UICollectionView in Swift
- How do I perform an auto-segue in Xcode 6 using Swift?
- How To make Label like below image in swift
- Swift generic coercion misunderstanding
- Sort Dictionary by keys
- How can I use Swift’s Codable to encode into a dictionary?
- How to disable pasting in a TextField in Swift?
- Swift – SpriteKit CGPoint Alignment
- How do you use .enumerated() with ForEach in SwiftUI?
- How to improve People Occlusion in ARKit 3.0
- Noop for Swift’s Exhaustive Switch Statements
- SwiftUI picker separate texts for selected item and selection view
- Multiple functions with the same name
- Programmatically detect Tab Bar or TabView height in SwiftUI
- SwiftUI Drag and Drop files
- How to access NSWindow from @main App using only SwiftUI?
- Why convenience keyword is even needed in Swift?
- Separating multiple if conditions with commas in Swift
- Using Codable on a dynamic type/object
- Class ‘ViewController’ has no initializers in swift