Can I access local images from an iframe inside of a uiwebview?
Basically Im attempting to take a php / jquery / css / html web app that is hosted remotely, and embed it in an iframe inside of a uiwebview in objective c using the big5 framework. I have my iframe set up and the web app is coming in correctly. My issue now is that 开发者_如何学JAVAI need to improve loading and performance. The easiest way to do this I think is to host all of the images locally. I've read that I can change the baseURL so that I can access local file system images, but I havent found anything suggesting that this is possible with an iframe and remote files, only local html files. Is there any way to do this? I found something else suggesting javascript injection on load? What would I have to do , load the page, wait for it to finish loading, inject into my css files the relative path to the images? will this work? is there an easier solution? or am I hopeless? haha. thanks
You could store the images as base64-encoded data, and load them via the data:
URI scheme.
精彩评论