iOS---TextView显示HTML文本_移动开发_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > 移动开发 > iOS---TextView显示HTML文本

iOS---TextView显示HTML文本

 2016/8/21 5:31:42  张无忌!  程序员俱乐部  我要评论(0)
  • 摘要:_checkAllIntroduceTextView=[[UITextViewalloc]initWithFrame:CGRectMake(10,0,kScreenWidth-20,kScreenHeight)];_checkAllIntroduceTextView.backgroundColor=self.view.backgroundColor;_checkAllIntroduceTextView.returnKeyType=UIReturnKeyDone
  • 标签:view iOS

    _checkAllIntroduceTextView = [[UITextView alloc] initWithFrame:CGRectMake(10, 0, kScreenWidth-20, kScreenHeight)];

    _checkAllIntroduceTextView.backgroundColor = self.view.backgroundColor;

    _checkAllIntroduceTextView.returnKeyType=UIReturnKeyDone;

    _checkAllIntroduceTextView.delegate = self;

    _checkAllIntroduceTextView.showsVerticalScrollIndicator = NO;

    NSAttributedString *attributedString = [[NSAttributedString alloc] initWithData:[@"后台返回给你的html格式的字符串" dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];

    _checkAllIntroduceTextView.attributedText = attributedString;

    _checkAllIntroduceTextView.textColor = KColor_Gray_6;

    [self.view addSubview:_checkAllIntroduceTextView];

 

 

 

 

<p><strong><span class=\"fontstyle0\">\U3010\U8fce\U777f\U57fa\U91d1\U3011</span></strong></p><p><span class=\"fontstyle0\">\U662f\U4e00\U5bb6\U4ee5\U6df1\U5ea6\U7814\U7a76\U3001 \U4ef7\U503c\U6316\U6398\U4e3a\U6838\U5fc3\Uff0c\U7acb\U8db3\U4e8e\U5168\U7403\U89c6\U91ce\Uff0c\U5177\U6709\U6df1\U539a\U4ea7\U4e1a\U80cc\U666f\U7684\U4e13\U4e1a\U6295\U8d44\U516c\U53f8\Uff0c\U516c\U53f8\U4e1a\U52a1\U8986\U76d6\U8d44\U4ea7\U7ba1\U7406\U7684\U591a\U4e2a\U9886\U57df\U3002<br />\U516c\U53f8\U4f9d\U6258\U63a7\U80a1\U80a1\U4e1c\U6df1\U539a\U7684\U4ea7\U4e1a\U53ca\U91d1\U878d\U80cc\U666f\U9ad8\U901f\U53d1\U5c55\Uff0c\U4e8e2014\U5e74\U6b63\U5f0f\U6210\U7acb\Uff0c\U5e76\U5df2\U6210\U4e3a\U4e2d\U56fd\U8bc1\U5238\U6295\U8d44\U57fa\U91d1\U4e1a\U534f\U4f1a\U4f1a\U5458\U3002</span></p><ul style=\"list-style-type: disc;\"><li><strong>\U7acb\U8db3\U4e8e\U5168\U7403\U89c6\U91ce</strong></li></ul><p>\U8fce\U777f\U57fa\U91d1\U662f\U4e00\U5bb6\U4ee5\U6df1\U5ea6\U7814\U7a76\Uff0c\U4ef7\U503c\U6316\U6398\U4e3a\U6838\U5fc3\Uff0c\U7acb\U8db3\U4e8e\U5168\U7403\U89c6\U91ce\U5177\U6709\U6df1\U539a\U4ea7\U4e1a\U80cc\U666f\U7684\U4e13\U4e1a\U6295\U8d44\U516c\U53f8\Uff0c\U516c\U53f8\U4e1a\U52a1\U8986\U76d6\U8d44\U4ea7\U7ba1\U7406\U7684\U591a\U4e2a\U9886\U57df\U3002</p><ul style=\"list-style-type: disc;\"><li><strong>\U5b89\U5168\U7a33\U5065\U9ad8\U901f\U53d1\U5c55</strong></li></ul><p>\U516c\U53f8\U4f9d\U6258\U63a7\U80a1\U80a1\U4e1c\U6df1\U539a\U7684\U4ea7\U4e1a\U53ca\U91d1\U878d\U80cc\U666f\U9ad8\U901f\U53d1\U5c55\Uff0c\U4e8e2014\U5e74\U6b63\U5f0f\U6210\U7acb\Uff0c\U5e76\U5df2\U6210\U4e3a\U4e2d\U56fd\U8bc1\U5238\U6295\U8d44\U57fa\U91d1\U4e1a\U534f\U4f1a\U4f1a\U5458\U3002\U6295\U8d44\U8005\U8d44\U91d1\U5747\U59d4\U6258\U94f6\U884c\U5168\U7a0b\U76d1\U7ba1\Uff0c\U7ecf\U4e25\U683c\U7684\U98ce\U9669\U63a7\U5236\U4f53\U7cfb\U548c\U624b\U6bb5\Uff0c\U5145\U5206\U8fd0\U7528\U5e02\U573a\U6cd5\U5219\Uff0c\U901a\U8fc7\U79d1\U5b66\U5316\U7684\U8d44\U672c\U8fd0\U4f5c\Uff0c\U786e\U4fdd\U5ba2\U6237\U7684\U8d44\U672c\U6295\U8d44\U5b89\U5168\U7a33\U5065\Uff0c\U4ef7\U503c\U589e\U503c\Uff0c\U6548\U76ca\U589e\U957f\Uff0c\U5145\U5206\U5b9e\U73b0\U793e\U4f1a\U6548\U76ca\Uff0c\U7ecf\U6d4e\U6548\U76ca\U4ee5\U53ca\U793e\U4f1a\U8d44\U672c\U4e09\U65b9\U5171\U8d62\U7684\U5706\U6ee1\U5c40\U9762\U3002</p><ul style=\"list-style-type: disc;\"><li><strong>\U7cbe\U82f1\U6c47\U96c6\U670d\U52a1\U4e13\U4e1a</strong></li></ul><p>\U8fce\U777f\U57fa\U91d1\U76ee\U524d\U62e5\U6709\U4e00\U6279\U5728\U8bc1\U5238\U6295\U8d44\Uff0c\U80a1\U6743\U6295\U8d44\Uff0c\U8d44\U4ea7\U7ba1\U7406\U7b49\U591a\U4e2a\U9886\U57df\U7684\U8d44\U6df1\U4e13\U4e1a\U4eba\U58eb\Uff0c\U5e76\U4e0e\U56fd\U5185\U5916\U4f17\U591a\U77e5\U540d\U91d1\U878d\U673a\U6784\U5c55\U5f00\U79ef\U6781\U5408\U4f5c\U3002\U516c\U53f8\U79c9\U627f\U201c\U552f\U6709\U4e13\U4e1a\Uff0c\U65b9\U663e\U4ef7\U503c\U201d\U7684\U7ecf\U8425\U7406\U5ff5\Uff0c\U4e0d\U65ad\U81f4\U529b\U4e8e\U63d0\U5347\U4e13\U4e1a\U80fd\U529b\Uff0c\U6253\U9020\U4e00\U6d41\U56e2\U961f\Uff0c\U5f15\U5bfc\U793e\U4f1a\U8d44\U672c\U8fdb\U5165\U8bc1\U5238\U6295\U8d44\Uff0c\U65b0\U4e09\U677f\U5e02\U573a\Uff0c\U517b\U8001\U7efc\U5408\U4ea7\U4e1a\Uff0c\U6587\U5316\U4ea7\U4e1a\U4ee5\U53ca\U4f18\U8d28BT\U9879\U76ee\U7b49\U56fd\U5bb6\U57fa\U7840\U8bbe\U65bd\U5efa\U8bbe\U9886\U57df\Uff0c\U7aed\U529b\U4e3a\U5ba2\U6237\U63d0\U4f9b\U4e13\U4e1a\U5b8c\U5584\U7684\U91d1\U878d\U6295\U8d44\U670d\U52a1\U3002</p>

 

发表评论
用户名: 匿名