简体   繁体   English

如何在iOS 8中的UIWebView中从文档加载png图像目标c

[英]How to load png image from document in UIWebView in iOS 8 Objective c

I have some png image in my document and i wanna to load these images in UIWebView like 我在我的文档中有一些png图像,我想在UIWebView中加载这些图像

<img src='/Users/rezakhalafi/Library/Developer/CoreSimulator/Devices/1784E9F2-4DCA-4D72-A7B0-1D74AFAFDFBA/data/Containers/Data/Application/54A0319C-A33D-4993-9CA3-20F73B8CD85F/Documents/CACHE/cache332377/9cache.png'>  

But it does not work. 但它不起作用。
I am using Objective C. 我正在使用Objective C.
Please help me. 请帮我。

I found it. 我找到了。
just add file:/ at the begin of address string. 只需在地址字符串的开头添加文件:/。

<img src='file:/Users/rezakhalafi/Library/Developer/CoreSimulator/Devices/1784E9F2-4DCA-4D72-A7B0-1D74AFAFDFBA/data/Containers/Data/Application/54A0319C-A33D-4993-9CA3-20F73B8CD85F/Documents/CACHE/cache332377/9cache.png'>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM