Open imzyf opened 6 years ago
http://www.hangge.com/blog/cache/detail_1570.html
//通过富文本来设置行间距 let paraph = NSMutableParagraphStyle() //将行间距设置为28 paraph.lineSpacing = 20 //样式属性集合 let attributes = [NSFontAttributeName:UIFont.systemFont(ofSize: 15), NSParagraphStyleAttributeName: paraph] label.attributedText = NSAttributedString(string: str, attributes: attributes)
http://www.hangge.com/blog/cache/detail_1570.html