【发布时间】:2015-11-19 14:07:02
【问题描述】:
我为按钮属性标题添加了一些属性
let attr = NSMutableAttributedString(string: currTitle)
attr.addAttribute(NSStrikethroughStyleAttributeName, value: 2, range: NSMakeRange(0, attr.length))
attr.addAttribute(NSForegroundColorAttributeName, value: UIColor.redColor(), range: NSMakeRange(0, attr.length))
currButton?.setAttributedTitle(attr, forState: UIControlState.Normal)
点击按钮后如何删除 NSStrikethroughStyleAttributeName?
【问题讨论】:
-
哇。这就是我感兴趣的问题。谢谢你的问题。这是奇迹。请分享一下
-
不客气 PiraTa...谢谢! :)
标签: ios swift nsattributedstring setattribute nsmutableattributedstring