如何读本地资源图片

NSString * constr=[NSString stringWithFormat:@"<p id='p_ImgView'><img width='300' src='file:%@' /></p>%@",[[NSBundle mainBundle] pathForResource:@"icon" ofType:@"png"],self.contentStr];
[self.webView loadHTMLString:constr baseURL:nil];
posted @ 2013-02-06 14:06  天纯蓝  阅读(171)  评论(0编辑  收藏  举报