title: UILabel with attributedText in custom UITableViewCell: Color not rendering until reuse (iOS10)
body: <p>I have a convenience extension like this:</p>
  
  <pre><code>extension NSMutableAttributedString {
  
      func append(string: String, attributes: [String: Any]) {
          let attributed = NSMutableAttributedString(string: string)
          let range = NSRange(location: 0, length: string.utf16.count)
          for (attribute, value) in attributes {
              attributed.addAttribute(attribute, value: value, range: range)
          }
          append(attributed)
      }
  }
  </code></pre>
  
  <p>I'm styling text in my UILabel thusly:</p>
  
  <pre><code>let normalAttributes = [NSForegroundColorAttributeName: darkGray]
  let lightAttributes = [NSForegroundColorAttributeName: lightGray]
  let text = NSMutableAttributableString()
  text.append("Part 1", attributes: normalAttributes)
  text.append("Part 2", attributes: lightAttributes)
  </code></pre>
  
  <p>All of this within a custom UITableViewCell class. What's happening is that the text is rendering with the base color in the NIB file, rather than the custom foreground color as per my attributed string - until I do something (like scroll around) that causes cell reuse, after which suddenly the colors <em>render correctly</em>.</p>
  
  <p>I can't seem to find anything wrong with the lifecycle of the object, and there's no other place that's messing with this label. The label, fwiw, is an IBOutlet, so I'm not creating a new one each time or anything strange.</p>