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"];

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

时间: 2024-08-28 22:21:09

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

xcode运行出现Could not load the "xxx.jpg" image referenced from a nib in the bundle with identifier的解决方法

该错误发生是在此时选择了Create folder references,此选项会建立一个文件夹的引用,而没有将文件放入项目中. 所以在[UIImage imageWithContentsOfFile:]时不能初始化uiimage.

错误代码: Could not load the "XXX.png" image referenced from a nib in the bundle with identifier "XXX"

出现该问题的原因是没有将相应地图片文件copy到bundle里,解决办法很简单, 点击项目名称,选择Build Phase,找到Copy Bundle Resources,点击“+”,将相应的资源文件添加即可.

iOS - xcode经常报的经典error解决办法大全

1.错误信息: 2015-10-28 10:39:55.933 XFW[2696:55982] *** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3347.44.2/UITableView.m:7524 (lldb) 错误原因: 返回cell的代码放在括号的范围不对,看下周围代码的作用域.有时括号太多,容易放错代码. 2.错误信息

IOS Xcode 无法识别IOS device 突然发生的

今天 我用真机mini好好地 ,再想测试一下iphone 4  发生了意外 两个测试机都找不到设备了 但是 都在充电 还能连接 itune !!!! 我郁闷了 解决办法 是 Mac iTunes 重新更新  据说 itunes 有时候会犯病 影响Xcode  所以 得卸载 重新装 .然后就好使了. 心得:使用测试机 要正常插入 点击iTunes退出机器 . IOS Xcode 无法识别IOS device 突然发生的,布布扣,bubuko.com

ios xcode如何修改应用的名称

ios xcode如何修改应用的名称 当你创建一个project时,会要求你输入product name & company identifier,这两个property的值should和你在apple developer member center的"Provisioning Portal"的"App IDs"里创建的bundle identifier (NOT App ID)匹配!如果不匹配的话,push notification feature和clo

ios Xcode编译错误

[BEROR]CodeSign error: code signing is requiredfor product type 'Application' in SDK 'iOS 7.1' xcode编译出现这个错误,我的做法是,附图 ios Xcode编译错误

iOS Xcode及模拟器SDK下载

原文: Xcode及模拟器SDK下载 如果你嫌在 App Store 下载 Xcode 太慢,你也可以选择从网络上下载: Xcode下载(Beta版打的包是不能提交到App Store上的) 绝对官方源!!!绝对官方源!!!绝对官方源!!!   不能确定自己的 Xcode 是否有问题?简单的一条命令就能验证! 在终端输入 spctl 命令,并带上安装的 Xcode 的路径: [ruby] view plain copy print? spctl --assess --verbose /Appli

iOS Xcode常用插件

在iOS的应用程序开发中,有些插件可以很方便我们的工作 只需要你把它们下载下来 编译即可 下面为大家推荐几种: 1  VVDocument--这是xcode规范注释的生成器  编译这个Demo之后 然后关闭Demo 在你的项目中需要注释的地方连续输入三个“/” 即出效果如下图 2. ColorSense --这是xcode中颜色识别与预览的插件 下载并编译此Demo  然后关闭Demo  在你项目中需要的地方输入代码 效果如下图 3.KSImageNamed --这是xcode中图片文件名自动补

iOS Xcode之SVN(remove git)

项目用SVN比较多,所以大家都把精力放在如何在XCODE上使用SVN. 配置SVN当然是很简单,但提交都默认出现git的提交窗,否则要到repositories界面去提交. 目前没有找到什么更好的办法,就做了两个处理: 1.在Repositories里面把 相应的 git相关的项目目录移除(见界面左下角的“-”号): 2.先关闭xcode,然后到终端界面,进入到相应的目录,用rm -fr .git 命令删除git. 3.关于.a等外部资源的提交 由于默认是将.a文件忽略和不提交的,因此需要修改下