SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
 1   var attrButes:[NSAttributedString.Key : Any]! = nil;
 2         let paraph = NSMutableParagraphStyle()
 3         paraph.lineSpacing = 8
 4         attrButes = [NSAttributedString.Key.font:UIFont.systemFont(ofSize: 13.5),NSAttributedString.Key.paragraphStyle:paraph]
 5         
 6         let size:CGRect = model.content!.boundingRect(with: CGSize(width: HL_APP_WIDTH - 30 , height: CGFloat.greatestFiniteMagnitude), options: NSStringDrawingOptions.usesLineFragmentOrigin, attributes: attrButes, context: nil)
 7         
 8 //        detailHeaderView.contTextLab.text = ""
 9         detailHeaderView.contTextLab.attributedText = NSAttributedString(string: model.content!, attributes: attrButes)
10         detailHeaderView.contTextLab.numberOfLines = 0
11         detailHeaderView.contTextLab.sizeToFit()
12         context_H = size.height 

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄