title: Color only underline in Swift
body: <p>How do i change the color of my underline in a label? I want only the underline to change color, and not the entire text.</p>
  
  <p>I have used this code to get the underline:</p>
  
  <pre><code>let underlineAttribute = [NSAttributedStringKey.underlineStyle: NSUnderlineStyle.styleSingle.rawValue]
  let underlineAttributedString = NSAttributedString(string: "\(nearSavings[indexPath.row]) ,-", attributes: underlineAttribute)
  cell.detailTextLabel?.attributedText = underlineAttributedString
  </code></pre>
  
  <p>But i cant find the code, to set the underline color. Anyone who can help?</p>