美文网首页
label显示html文本

label显示html文本

作者: 某年某月某日晴 | 来源:发表于2016-09-12 10:53 被阅读32次

NSAttributedString *attrStr = [[NSAttributedString alloc] initWithData:[descHtml dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
self.label.attributedText = attrStr;

相关文章

网友评论

      本文标题:label显示html文本

      本文链接:https://www.haomeiwen.com/subject/otjpettx.html