Kien Lhi

非自由职业者,半个农民。

联系邮箱:lhikien@gmail.com

This can be done without subclassing using NSAttributedString and the attributedText property like so:

let subtitleParagraphStyle: NSMutableParagraphStyle = NSMutableParagraphStyle.init()

subtitleParagraphStyle.minimumLineHeight = 20

let subText: NSMutableAttributedString = NSMutableAttributedString.init(string: "XX, XX")

subText.addAttribute(NSParagraphStyleAttributeName, value:subtitleParagraphStyle, range: NSMakeRange(0, subText.length))

cell.detailTextLabel?.attributedText = subText;


评论