开发者

Unable to see any local or remote images in UIWebView when loadHTMLString is used to load page

开发者 https://www.devze.com 2023-02-15 21:16 出处:网络
No matter what I try, the only way I can see any images in my UIWebView, is if I load a page using loadRequest.loadHTMLString w开发者_JS百科ill load everything except for images.

No matter what I try, the only way I can see any images in my UIWebView, is if I load a page using loadRequest. loadHTMLString w开发者_JS百科ill load everything except for images.

I have tried using all the online examples of setting the base url. Nothing seems to work. I've tried setting the base url to my bundle path, no local images display. I've tried setting the base url to http://www.google.com and pasting the google home page source into a test file, load it with loadHTMLString. The page shows up with no images.

What am I doing wrong?


I'd recommend taking a peek at this...

UIWebView links

Also you may notice that between the simulator and the real device files become case sensitive on the device... I'm not sure if UIWebView makes it case insensitive but thought it might be worth mentioning incase it gives any more food for thought.

If this doesn't work perhaps you can post your code snippet as this may help.

0

精彩评论

暂无评论...
验证码 换一张
取 消