How can I load an image in iphone webview from a .html file?
相关问题
- Views base64 encoded blob in HTML with PHP
- CALayer - backgroundColor flipped?
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
Yes.
UIWebView
has two methods:-loadHtmlString:baseURL:
and-loadData:MIMEType:textEncodingName:baseURL:
You can get the file data using NSData's
-initWithContentsOfFile:
, then pass it to the latter of those methods above.EDIT: Whoops, I didn't notice the img part. But it still should work. Are you trying to load only the image?
Easy
Now in your html you can simply refer to the image as