有个需求, |
|
1. Loaded the web page in webView.
2. After webViewDidfinishload, I stored the contents into an NSData object and then converted data to an NSString and wrote to a file and saved in the application folder. 3. Now while trying load it, I am taking the string back from the file and converting it back to NSData and loading it to webView using loadData: method. 這是外國英文網站找到的….. 1. The web pages I am trying to save are simple (doesnt have much css and all) and the problem I am facing is that I am not able to load images, since most of the images in an html are external links, it requires net connection to load it. Any idea how to get images too to get saved to my file? 2. The second problem I am facing is how to delete a saved file from app””s folder. I am able to get the list of files in the application””s folder and get it populated in a table view and now I want to delete the file when i do “swipe to delete” 這兩個問題是他碰到的 |
|
http://dblog.com.au/iphone-development/iphone-sdk-tutorial-build-your-very-own-web-browser/
上面這一篇,是用UIWebView打造自己的瀏覽器的範例 http://dblog.com.au/iphone-development/loading-local-files-into-uiwebview/ |
|
这种方法有想过,
除了图片问题,我们还关心工作量的问题,这样做就变的复杂了。 这是我们的最后方案,迫不得已才会用的。 我们现在寄希望于iphone的缓存功能很强大很强大,强大到访问过的网页就可以随时离线访问。 第二个问题是关于删除缓存吗? |
|
我以後也用繁體吧,反正iphone開發版面只有你回答問題。
這種方法有想過, 第二個問題是關於刪除緩存嗎? |
|
其實我只是常常忘了切換簡體….
只是就查到現在的資料來看, IPhone的緩存功能似乎一點都不強大… |
|
那我死定了,
剛在googlecode上搞到freebase的代碼,和離線存儲有關,研究ing。 |
|
30分 |
总会解决的…
加油 |
運氣好了一點點。
我剛給你說過的那個freebase讓我看到些希望。 現在能做到的。 |
|
我這試著解決,應該問題不大。
還有,離線網頁的樣式亂了。 |
|
應該是css也沒有下載到local的關係
|
|
搞定。
|