我想从WebView中的资源加载HTML文件。pathForResource inDirectory问题
在资源我有:
的test.html
testfolder->的test.html
此代码的工作完美:
[[webview1 mainFrame] loadRequest:
[NSURLRequest requestWithURL:
[NSURL fileURLWithPath:
[[NSBundle mainBundle] pathForResource:@"test" ofType:@"html"]]]];
这一个 - 崩溃的应用程序( SIGABRT):
[[webview1 mainFrame] loadRequest:
[NSURLRequest requestWithURL:
[NSURL fileURLWithPath:
[[NSBundle mainBundle] pathForResource:@"test" ofType:@"html" inDirectory:@"testfolder" ]]]];
如何从文件夹中获取文件?
谢谢!这种帮助。 和提示 - 该组显示在黄色文件夹图标的资源,与蓝色文件夹图标的文件夹。 – nukl 2010-02-24 16:43:17