title: Changing Placeholder Text Color Programmatically
body: <p>Im trying to change the placeholder text in textfield to white with a background color of black. Programmatically</p>
  
  <p>Here is my code</p>
  
  <pre><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
  }()
  </code></pre>
  
  <p>Thank you in advance.</p>