Displaying an image in UIWebView
bundle, cocoa-touch, iphone, uiwebview
Solution
Try to change the
[NSURL URLWithString: @"http://www.abc.com"]
to a
[NSURL fileURLWithPath:path]
where path is something like
NSString *path = [[NSBundle mainBundle] bundlePath];
...depending where the image is placed.
Problem
I'd like to dislay an image in UIWebView using ``` <img src="imageInBundle.png"/> ``` The above image is in my bundle. I load it, along with other HTML in a string, like this: ``` [myWebView loadHTMLString:htmlString baseURL:[NSURL URLWithString: @"http://www.abc.com"]]; ``` However, I just get a blue box with a white question mark. Is there something else I need to do?