I\'m trying to add an underline to some text in my Swift app. This is the code I have currently:
let text = NSMutableAttributedString(string: self.currentHome.na
If you want an actual dashed line, you should OR | the raw values of both PatternDash and StyleSingle enums like below:
let dashed = NSUnderlineStyle.PatternDash.rawValue | NSUnderlineStyle.StyleSingle.rawValue
let attribs = [NSUnderlineStyleAttributeName : dashed, NSUnderlineColorAttributeName : UIColor.whiteColor()];
let attrString = NSAttributedString(string: plainText, attributes: attribs)