How to load a WebView on local files, but external to mainBlundle? (iPhone App)
I have written a 开发者_开发技巧script that download some HTML files into the Documents folder of my app! I want to load this files in my WebView, is that possible?
For example: If index.html is present in Documents folder, load it, else load index.html in mainBundle!
Thanks to everyone can help me!
Sure, just use:
[webview loadRequest: [NSURLRequest requestWithURL: [NSURL fileURLWithPath: [@"~/Documents/index.html" stringByExpandingTildeInPath]]]]
精彩评论