ios xcode Could not load the "MyImage.png" image referenced from a nib in the bundle with identifier "com.mytest.MyProject"
出现找不到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"];
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。