I am trying to use NSMutableAttributedString with dotted underline below is my code but none of the Patterns seem to work am I missing something ?
var str :
You have to do it like this:
Xcode 10 • Swift 4.2 or later
yourLabel.attributedText = NSAttributedString(string: "Hello World !!!", attributes: [.underlineStyle: NSUnderlineStyle.patternDot.union(.single).rawValue])
Note: for older Swift syntax check edit history