码迷,mamicode.com
首页 > 移动开发 > 详细

ios xcode Could not load the "MyImage.png" image referenced from a nib in the bundle with identifier "com.mytest.MyProject"

时间:2014-05-22 03:44:48      阅读:491      评论:0      收藏:0      [点我收藏+]

标签:blog   c   code   http   a   int   

出现找不到xib指定的图片,需要指定图片的完整路径,不能只是图片名

详见:http://vocaro.com/trevor/blog/2012/10/21/xcode-groups-vs-folder-references/

An image stored as a folder reference will not work with Interface Builder! When editing, IB is able to find the image file and allows you to select it, but when it generates the XIB, it strips the folder location, which prevents it from being found. The result is a blank image and a runtime error:"Could not load the "MyImage.png" image referenced from a nib in the bundle with identifier "com.mytest.MyProject"

 

When loading a resource, you must specify the full path. Instead of:

[UIImage imageNamed:@"GoPago"];

you must do:

[UIImage imageNamed:@"Images/Icons/GoPago"];

ios xcode Could not load the "MyImage.png" image referenced from a nib in the bundle with identifier "com.mytest.MyProject",布布扣,bubuko.com

ios xcode Could not load the "MyImage.png" image referenced from a nib in the bundle with identifier "com.mytest.MyProject"

标签:blog   c   code   http   a   int   

原文地址:http://www.cnblogs.com/coolbear/p/3738479.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!