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;
评论