title: How to use dynamic colors in attributed strings via interface builder?
body: <p>According to <a href="https://developer.apple.com/videos/play/wwdc2019/214/?time=2110" rel="nofollow noreferrer">Implementing Dark Mode on iOS</a> we need to set the foregroundColor attribute to the new label color. How is this done with interface builder?</p>
  
  <p>I tried using the "Text Color" option and setting the color to Developer->labelColor, but that did not work.</p>
  
  <p>EDIT: As this is currently not possible, I used this workaround:</p>
  
  <pre><code>override func viewDidLoad() {
      // Support Dark Mode
      if #available(iOS 13.0, *) {
          let attributes = NSMutableAttributedString(attributedString: textView.attributedText!)
          attributes.addAttribute(.foregroundColor, value: UIColor.label, range: NSRange(location: 0, length: attributes.mutableString.length))
          textView.attributedText = attributes
      }
  }
  </code></pre>