Im trying to change the placeholder text in textfield to white with a background color of black. Programmatically
Here is my code
let emailTextField: UITextField = {
let emailTF = UITextField()
emailTF.attributedPlaceholder = NSAttributedString(string: "Enter Email", attributes: [kCTForegroundColorAttributeName as NSAttributedStringKey: kCISamplerWrapBlack])
emailTF.translatesAutoresizingMaskIntoConstraints = false
//User input text white
emailTF.textColor = UIColor.white
emailTF.backgroundColor = UIColor.black
emailTF.borderStyle = .roundedRect
emailTF.font = UIFont.systemFont(ofSize: 16)
return emailTF
}()
Thank you in advance.