NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes :nil error :nil ];
UILabel * myLabel = [[UILabel alloc] initWithFrame: self .view.bounds];
myLabel.attributedText = attrStr;
[ self .view addSubview:myLabel];
查看更多关于UILabel可以显示html文本_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did111446