title: UITextField NSForegroundColor turns transparent after screen rotation Swift
body: <p>I am having a problem that the UITextField font foreground color turns transparent after screen rotation. Below is my code.</p>
  
  <pre><code>let TextAttributes = [
      NSStrokeColorAttributeName : UIColor.blackColor(),
      NSForegroundColorAttributeName : UIColor.whiteColor(),
      NSFontAttributeName : UIFont(name: "HelveticaNeue-CondensedBlack", size: 40)!,
      NSStrokeWidthAttributeName : 3.0
  ]
  
  //In viewDidLoad
  textFieldTop.delegate = textFieldTopDelegate
  textFieldTop.text = "TOP"
  textFieldTop.frame = CGRectMake(0, 88, self.view.frame.width, 44)
  textFieldTop.defaultTextAttributes = TextAttributes
  self.view.addSubview(textFieldTop)
  textFieldTop.textAlignment = NSTextAlignment.Center
  
  textFieldBottom.delegate = textFieldBottomDelegate
  textFieldBottom.text = "BOTTOM"
  textFieldBottom.frame = CGRectMake(0, self.view.frame.height - 88, self.view.frame.width, 44)
  textFieldBottom.defaultTextAttributes = TextAttributes
  self.view.addSubview(textFieldBottom)
  textFieldBottom.textAlignment = NSTextAlignment.Center
  
  //in didRotateFromInterfaceOrientation
  textFieldTop.frame = CGRectMake(0, 88, self.view.frame.width, 44)
  textFieldTop.defaultTextAttributes = TextAttributes
  self.view.addSubview(textFieldTop)
  textFieldTop.textAlignment = NSTextAlignment.Center
  textFieldBottom.frame = CGRectMake(0, self.view.frame.height - 88, self.view.frame.width, 44)
  textFieldBottom.defaultTextAttributes = TextAttributes
  self.view.addSubview(textFieldBottom)
  textFieldBottom.textAlignment = NSTextAlignment.Center
  </code></pre>
  
  <p>How can I make sure the foreground text color does not automatically turn transparent after rotation?</p>
  
  <p>Thanks!</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I realized my problem does not come from the rotation. For some reason the foregroundcolor is transparent, and it cannot be set.</p>