Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
HTML ファイルをアプリの Documents フォルダーにダウンロードするスクリプトを作成しました。このファイルを WebView にロードしたいのですが、可能ですか?
例: index.html が Documents フォルダにある場合はそれをロードし、そうでない場合は index.html を mainBundle にロードします。
みんなのおかげで私を助けることができます!
もちろん、次を使用してください:
[webview loadRequest: [NSURLRequest requestWithURL: [NSURL fileURLWithPath: [@"~/Documents/index.html" stringByExpandingTildeInPath]]]]