title: Unable to make some part of UILabel underline in Swift?
body: <p>I have a UILabel I want to make some part of it as underline. I am using below code for that. But it underline the whole label not the some part of label. Please tell me how can I make some part of label as Underline.</p>
  
  <pre><code>let attributedString = NSMutableAttributedString(string: "UserAgreement".localized)
  attributedString.addAttribute(NSUnderlineStyleAttributeName, value: NSUnderlineStyle.styleSingle.rawValue, range: NSRange(location: 0, length: 10))
  
  labelTc.attributedText = attributedString
  </code></pre>
  
  <p>I don't want to do with the storyboard</p>