如何读本地资源图片

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];
原文地址:https://www.cnblogs.com/skyblue/p/2905281.html