1
我在资源文件夹ABC中有一个图像说明point.png。从资源中挑选图像并加载到网络视图
我要显示HTML中的图像
NSString *myFilePath= [[NSBundle mainBundle] pathForResource:@"Point1" ofType:@"png"];
NSMutableString *strForWebView = [NSString stringWithFormat:@"<html>"
"<head><b>%@</b></head><br>"
"<img src= %@ height='30' width='30' />"
, [[play quotations] objectForKey:@"Heading"], myFilePath, .......
所以现在我应该怎么做,这样它选择从它在Web视图加载图像的HTML中的路径......
请帮助
感谢
转到此链接。我希望这将有助于你 的http:// [stackoverflow.com/questions/6420925/load-resources-from-relative-path-using-local-html-in-uiwebview] [1] [1]:http://stackoverflow.com/questions/6420925/load-resources-from-relative-path-using-local-html-in-uiwebview – Mary 2012-07-12 12:08:30