【发布时间】:2014-02-26 10:19:18
【问题描述】:
我正在使用CocoaHTTPServer,并且能够启动服务器。在我的资源文件夹中,我添加了一个名为“index.html”的文件,这让我感到困惑。
-
我可以通过
获取索引文件的路径[主包 pathForResource:@"index" ofType:@"html"]
但它给了我路径
/Users/Library/Application%20Support/iPhone%20Simulator/7.0.3/Applications/。 有什么方法可以让路径变成一个 web-url 像http://127.0.0.1:56000/user/library/.../index.html"将其加载到 UIWebView。 - 我想获取上面格式的文件路径,因为我想 捕获 UIWebView 何时向它发出请求以及应用程序何时 回应。
有什么方法可以实现吗? 提前致谢。
【问题讨论】:
标签: ios iphone cocoahttpserver