将png文件添加到Xcode文件夹的正确方法是什么?

时间:2012-08-28 01:45:28

标签: iphone

已经将文件添加到Xcode很长一段时间了,并且已经在“Groups”中组织它们了。一切似乎都按预期工作。但最近我添加了一个文件夹来测试带有2个png图像的html文件。 html文件可以引用第二个png图像,但第一个png图像只是拒绝被识别。

我认为必须有一些我错过的Xcode文件夹。

希望有人知情可以帮助...

<center><img src="first_button.png" ></center>    


<left><H4>The button is located at the bottom of the screen.         
</H4>


<BR>

<center><H3>

    Another button description

</H3>
</center>


<center><img src="A_icon_11_red.png" width="45" height="45"></center>

<BR>    

如果输入Safari,上面运行完全正常。但UIWebView会错过第一个png图像。另一个有趣的一点是,当我将两个png文件名都改为A_icon_11_red.png时,一切都会按预期出现。所以我认为这与first_button.png添加到项目中的方式有​​关。

关于捆绑目录,我有以下内容......

if ((f_path = [bundle pathForResource : @"about_screen" 
                               ofType : @"html" 
                          inDirectory : @"about_html"]) != nil)

{         

// additional lines ...    

}

0 个答案:

没有答案