开发者

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]]]]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜