小编Raj*_*til的帖子

如何使用NSUnderlineStyle.PatternDot

我试图使用NSMutableAttributedString与下面的虚线下划线是我的代码,但没有一个模式似乎工作,我错过了什么?

var str : NSMutableAttributedString = NSMutableAttributedString(string: "HelloWorld")
        str.addAttribute(NSUnderlineStyleAttributeName  , value: NSNumber(integer:(NSUnderlineStyle.PatternDot).rawValue), range: NSMakeRange(0, str.length))
Run Code Online (Sandbox Code Playgroud)

iphone nsattributedstring ios ios7 swift

2
推荐指数
1
解决办法
1490
查看次数

标签 统计

ios ×1

ios7 ×1

iphone ×1

nsattributedstring ×1

swift ×1