1
我已經像使用波紋管代碼一樣顯示圖像,但圖像未顯示。圖像未顯示在目標文件中的HTML格式文件中c
NSString *htmlString = [NSString stringWithFormat:@"<html>\
<body>\
<tr>\
<td>\
<img src=\"images/a.png\" />\ // a.png is under Resources/images folder
</td>\
</tr>\
<tr>\
<td>\
hello\
</td>\
</tr>\
</body>\
</html>"];
[wView loadHTMLString:htmlString baseURL:nil];
但通過使用上面的代碼沒有顯示圖像。
+1,我想這可能會工作 – Naved
使用NSURL代替的NSString。並使用'stringByAddingPercentEscapesUsingEncoding:'而不是手動執行。 –