Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. func underLine(subString: String) {
  2. if let range = self.string.range(of: subString) {
  3. self.underLine(onRange: NSRange(range, in: self.string))
  4. }
  5. }
  6. func underLine(onRange: NSRange) {
  7. self.addAttributes([NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue],
  8. range: onRange)
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement