给UILable中的文字添加删除线样式
2015-12-19 22:55
369 查看
https://lvwenhan.com/ios/438.html
// let attr = NSMutableAttributedString(string: content!)
// attr.addAttribute(NSStrikethroughStyleAttributeName, value: NSNumber(integer: 1), range: NSMakeRange(0, 1))
// titleLabel.attributedText = attr
// titleLabel.sizeToFit()
let attributedText = NSAttributedString(string: "内容", attributes: [NSStrikethroughStyleAttributeName: 1]) let contentLabel = UILabel() contentLabel.attributedText = attributedText
// let attr = NSMutableAttributedString(string: content!)
// attr.addAttribute(NSStrikethroughStyleAttributeName, value: NSNumber(integer: 1), range: NSMakeRange(0, 1))
// titleLabel.attributedText = attr
// titleLabel.sizeToFit()
相关文章推荐
- Request和Response详解
- iOS开发中UIPopoverController的使用详解
- Django中Request 对象介绍
- UIAlertController 和 UIAlertView的使用
- UVA 1594 set 里面放queue
- 仿淘宝UED的左边跟随鼠标滑动导航
- duilib相关信息和网址
- Arduino - 编程参考手册
- LTView和UIAlertView
- 关于UITableviewcell的accessoryType属性
- Queue 消息的发送与接收(PTP 消息传递模型)
- Codeforce 题目264B Good Sequences(DP,相邻两数不互质的LIS)
- iOS Dev (60) 怎样实现 UITextView 中的 placeHolder
- iOS UIScrollView滚动视图/无限循环滚动/自动滚动
- UI_Label总结
- 52.N-Queens II
- UIButton
- The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class
- UILable
- UI学习第01天