ios xcode Could not load the "MyImage.png" image referenced from a nib in the bundle with identifier "com.mytest.MyProject"
2014-05-20 11:16
831 查看
出现找不到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:
you must do:
详见: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
- Could not load the "start.png" image referenced from a nib in the bundle with identifier "com.yourco
- Could not load the "defaultimg" image referenced from a nib in the bundle with identifier "com.abc"
- 错误代码: Could not load the "XXX.png" image referenced from a nib in the bundle with identifier "XXX"
- Could not load the "" image referenced from a nib in the bundle with identifier "com.****.***
- Could not load the "light_rain.png" image referenced from a nib in the bundle with identifier
- Could not load the "start.png" image referenced from a nib in the bundle with identifier
- Could not load the "logo.png" image referenced from a nib in the bundle with identifier
- Could not load the "*.png" image referenced from a nib in the bundle with identifier
- image asset:Could not load the "scene" image referenced from a nib in the bundle with identifier
- 打印出现:Could not load the "" image referenced from a nib in the bundle with identifier
- Could not load the "" image referenced from a nib in the bundle with identifier XXXXX
- Could not load the "null" image referenced from a nib in the bundle with identifier ""
- Could not load the "XX.jpg" image referenced from a nib in the bundle with identifier "cn.Norm"
- iOS Could not load the "111.image" image referenced from a nib in th
- reason: 'Could not load NIB in bundle: "XXXXXXX" with name 'xxCell'
- Xcode—Could not load the "image.png" image
- image referenced from a nib in the bundle with解决方案
- Could not load image referenced from a nib
- 'Could not load NIB in bundle: 'NSBundle < /Bundle/Application/ .app> (loaded)' with name 'Car