UILabel展示html富文本
来源:互联网 发布:淘宝网迪奥香水 编辑:程序博客网 时间:2024/04/30 05:24
UILabel展示html文本
NSString * htmlString =@"<html><body> Some html string \n <font size=\"13\" color=\"red\">This is some text!</font> </body></html>";
NSAttributedString * attrStr = [[NSAttributedStringalloc]initWithData:[htmlStringdataUsingEncoding:NSUnicodeStringEncoding]options:@{NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType }documentAttributes:nilerror:nil];
UILabel * myLabel = [[UILabelalloc]initWithFrame:CGRectMake(100, 100, 100, 100)];
myLabel.attributedText = attrStr;
[self.viewaddSubview:myLabel];
0 0
- UILabel展示html富文本
- UILabel展示HTML文本
- UIWebView展示html富文本
- UILabel显示富文本
- iOS UILabel富文本
- iOS UILabel 显示带有html标签的富文本内容
- iOS UIlabel怎么加载html字符串 富文本的用法
- UILabel 简单的富文本
- IOS之UILabel富文本
- UILabel显示html文本
- UILabel显示html文本
- UILabel加载html文本
- 解析html富文本
- 随手笔记 UIlabel 简单富文本
- iOS7加载富文本(UILabel)
- NGUI UILabel 富文本格式说明
- UILabel设置富文本格式显示
- UILabel 富文本 显示文字和图片
- Linux_1.5_makefile工程管理
- iOS错误汇总:解决Xcode iPhone工程变成了My Mac的问题
- Zookeeper 04 异步访问ZooKeeper
- DDS函数信号发生器用于许多用途和它有几个优点
- Jquery中AJAX参数详细介绍
- UILabel展示html富文本
- iOS开发UI篇—程序启动原理和UIApplication
- 一些linux小笔记
- ORACLE 常用函数——日期/时间函数
- 第十九讲字符数据及字符类型|字母及其编码|能对齐的数据
- JTable常见用法细则
- poj_2253
- 新一代能效数据中心
- Oracle 对日期的处理