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