利用UILabel、UITextView加载html文本_html/css_WEB-ITnose
程序员文章站
2024-01-06 22:03:34
...
挺简单,直接上代码了
NSString *strHtml = @"提示
1、测试测试测试测试测试测试测试测试测试测试测试测试
2、测试测试测试测试测试测试测试测试测试测试";NSAttributedString * strAtt = [[NSAttributedString alloc] initWithData:[strHtml dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];self.labelContent.attributedText = strAtt;self.textViewContent.attributedText = strAtt;
推荐阅读
-
利用UILabel、UITextView加载html文本_html/css_WEB-ITnose
-
UITextView加载html文本显示一半问题
-
UITextView和UILabel加载HTML_html/css_WEB-ITnose
-
UITextView和UILabel加载HTML_html/css_WEB-ITnose
-
UILabel可以显示html文本_html/css_WEB-ITnose
-
UILabel用原生方法显示HTML文本_html/css_WEB-ITnose
-
利用UILabel、UITextView加载html文本_html/css_WEB-ITnose
-
利用@font-face加载Web字体_html/css_WEB-ITnose
-
UILabel可以显示html文本_html/css_WEB-ITnose
-
利用@font-face加载Web字体_html/css_WEB-ITnose