Question

I've created webpage and import it to Xcode

The web page contains texts and images

When I load the webpage inside UIWebView the page appear but without Images

The webpage is created by iAd Producer

I've no background in HTML or CSS

Was it helpful?

Solution

Have you checked the URL? It might be a relative one (e.g. '/img/foo.jpg').

You can add a base URL to your webview in that case:

NSString *path = [[NSBundle mainBundle] bundlePath];
NSURL *baseURL = [NSURL fileURLWithPath:path];
[webView loadHTMLString:htmlString baseURL:baseURL];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top