Question

I have an image that is set to content and is in the root of the bundle. I have verified it is there in the simulator.

When I construct HTML to display in the UIWebView, this HTML fails to show the image:

Is there a relative path it should be in?

Note: I use the bundle as the base path in the call to show the html.

(I use MonoTouch) NSUrl path = new NSUrl (NSBundle.MainBundle.BundlePath);

Was it helpful?

Solution

Not sure how MonoTouch plays with URL's, but since it's built atop NSUrl you probably still need to do something like this:

NSURL *myUrlPath = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];

You can't just use the plain NSURL constructor...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top