@xworld do {
let attrStr = try NSAttributedString(data: html.data(using: String.Encoding.unicode, allowLossyConversion: true)!, options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil)
label.attributedText = attrStr
} catch {
print("解析html出错 : \(error)")
label.text = ""
}
Swift3.0下,UILabel加载html,实现富文本上述方法是写在UITableViewCell中给cell上的UILabel赋值; 以上是下发的html标签