title: UITextfield.Text color is not working despite being set in code and attributes inspector - Swift/Xcode
body: <p>I am trying to set the text color of two textfields on my UIStoryboard. I have attempted to set the color in both the attributes inspector and the code. Regardless, every time I run the simulator, the text color is clear and just takes on the Main Views background color.</p>
  
  <p>Below is my code for setting the text color. The color is set within an array called MemeTextAttributes and the array is then set as the value for the text_field_name.defaultTextAttributes in the viewDidLoad().</p>
  
  <pre><code>let memeTextAttributes: [NSAttributedString.Key: Any] = [
       NSAttributedString.Key.strokeColor: UIColor.black,
       NSAttributedString.Key.foregroundColor: UIColor.purple,
       NSAttributedString.Key.font: UIFont(name: "HelveticaNeue-CondensedBlack", size: 40)!,
       NSAttributedString.Key.strokeWidth: 2.0
  ]
  
  override func viewDidLoad() {
      super.viewDidLoad()
      self.topTxtField.delegate = self
      self.bottomTxtField.delegate = self
      topTxtField.text = "TOP"
      topTxtField.textAlignment = NSTextAlignment.center
      bottomTxtField.text = "BOTTOM"
      bottomTxtField.textAlignment = NSTextAlignment.center
      topTxtField.defaultTextAttributes = memeTextAttributes
      bottomTxtField.defaultTextAttributes = memeTextAttributes
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/6OTDt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6OTDt.png" alt="Color being set in the attributes inspector "></a>
  <a href="https://i.stack.imgur.com/CMtkh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CMtkh.png" alt="Image of simulator with both textFields"></a></p>