<bdo id='wnoRT'></bdo><ul id='wnoRT'></ul>

<i id='wnoRT'><tr id='wnoRT'><dt id='wnoRT'><q id='wnoRT'><span id='wnoRT'><b id='wnoRT'><form id='wnoRT'><ins id='wnoRT'></ins><ul id='wnoRT'></ul><sub id='wnoRT'></sub></form><legend id='wnoRT'></legend><bdo id='wnoRT'><pre id='wnoRT'><center id='wnoRT'></center></pre></bdo></b><th id='wnoRT'></th></span></q></dt></tr></i><div id='wnoRT'><tfoot id='wnoRT'></tfoot><dl id='wnoRT'><fieldset id='wnoRT'></fieldset></dl></div>

<tfoot id='wnoRT'></tfoot>

    1. <small id='wnoRT'></small><noframes id='wnoRT'>

      <legend id='wnoRT'><style id='wnoRT'><dir id='wnoRT'><q id='wnoRT'></q></dir></style></legend>
      1. 从 XCode 调用本地 HTML 文件时出现问题

        Problem calling a Local HTML File from XCode(从 XCode 调用本地 HTML 文件时出现问题)

          <small id='p99MM'></small><noframes id='p99MM'>

            <tbody id='p99MM'></tbody>

              <i id='p99MM'><tr id='p99MM'><dt id='p99MM'><q id='p99MM'><span id='p99MM'><b id='p99MM'><form id='p99MM'><ins id='p99MM'></ins><ul id='p99MM'></ul><sub id='p99MM'></sub></form><legend id='p99MM'></legend><bdo id='p99MM'><pre id='p99MM'><center id='p99MM'></center></pre></bdo></b><th id='p99MM'></th></span></q></dt></tr></i><div id='p99MM'><tfoot id='p99MM'></tfoot><dl id='p99MM'><fieldset id='p99MM'></fieldset></dl></div>

              <tfoot id='p99MM'></tfoot>
                <legend id='p99MM'><style id='p99MM'><dir id='p99MM'><q id='p99MM'></q></dir></style></legend>

                • <bdo id='p99MM'></bdo><ul id='p99MM'></ul>
                  本文介绍了从 XCode 调用本地 HTML 文件时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这是我的 WebView 代码:

                  Here's my WebView Code:

                  [webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:
                  [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]];
                  

                  这是我的错误:

                  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', 
                  reason: '*** -[NSURL initFileURLWithPath:isDirectory:]: nil string parameter'
                  

                  有人可以帮忙吗?它说的是 nil 字符串,但 NSURL 字符串是 index.html

                  Can anyone help? It's saying nil string but the NSURL string is index.html

                  我唯一的想法是索引文件可能没有正确存储.它在项目目录中 - 与 XCode 项目文件 xcodeproj 和 info.plist 相同的文件夹

                  My only thought is that perhaps the index file isn't stored correctly. It's in the project directory - the same folder as the XCode project file xcodeproj and the info.plist

                  推荐答案

                  检查文件是否已复制到您的应用程序包中.当 [[NSBundle mainBundle] pathForResource:ofType:] 返回 nil 时,很可能包中没有同名的文件

                  Check that the file is copied to your application bundle. When [[NSBundle mainBundle] pathForResource:ofType:] returns nil very most likely there is no file with this name in the bundle

                  在 Xcode3 中,右键单击侧栏中的组和文件"标题并选择目标成员资格".确保 index.html 前面的复选框被选中.

                  In Xcode3 right click the "Groups & Files" header in the side bar and select "target membership". Make sure the checkbox in front of index.html is checked.

                  这篇关于从 XCode 调用本地 HTML 文件时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  How to convert 32 bit PNG to RGB565?(如何将 32 位 PNG 转换为 RGB565?)
                  Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                  Game center facebook like(游戏中心 facebook 喜欢)
                  Objective-C++ importing C++ class fails, cassert not found(Objective-C++ 导入 C++ 类失败,未找到 cassert)
                    <tbody id='RVzvi'></tbody>

                • <legend id='RVzvi'><style id='RVzvi'><dir id='RVzvi'><q id='RVzvi'></q></dir></style></legend>

                      <bdo id='RVzvi'></bdo><ul id='RVzvi'></ul>
                        <tfoot id='RVzvi'></tfoot>

                          <small id='RVzvi'></small><noframes id='RVzvi'>

                          <i id='RVzvi'><tr id='RVzvi'><dt id='RVzvi'><q id='RVzvi'><span id='RVzvi'><b id='RVzvi'><form id='RVzvi'><ins id='RVzvi'></ins><ul id='RVzvi'></ul><sub id='RVzvi'></sub></form><legend id='RVzvi'></legend><bdo id='RVzvi'><pre id='RVzvi'><center id='RVzvi'></center></pre></bdo></b><th id='RVzvi'></th></span></q></dt></tr></i><div id='RVzvi'><tfoot id='RVzvi'></tfoot><dl id='RVzvi'><fieldset id='RVzvi'></fieldset></dl></div>