码迷,mamicode.com
首页 > Web开发 > 详细

UIWebView 直接显示html代码

时间:2014-07-16 18:05:01      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   cti   

<html>

<head>

</head>

<body>

<img src = "http://t1.baidu.com/it/u=1075557596,3331641536&fm=15&gp=0.jpg">

这是文字

 

<br/><br/>

</body>

</html>
////获取html到NSString

 NSURL *url = [NSURL URLWithString:@"http://www.xtox.net/product/detail.action?product.id=11"];

 NSString *strHtml = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];

   
////显示到UIWebView
    [self.m_web loadHTMLString:strHtml baseURL:nil];

 

UIWebView 直接显示html代码,布布扣,bubuko.com

UIWebView 直接显示html代码

标签:style   blog   http   color   io   cti   

原文地址:http://www.cnblogs.com/ygm900/p/3847422.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!