最新消息:iOS编程开发交流群(6906921) ,Mac.Cocoa开发交流群(7758675) 欢迎iOS/macOS开发编程爱好及学习者加入!

Bundle打包Could not load the "XXX" image referenced from a nib in the bundle with identifier XXX

iOS 天狐 7344浏览 0评论

啊啊啊,这个问题遇到好多次,但是时间长了今天居然忘了怎么回事了。

把storyboard与xib 与图片资源都打入自定义bundle中,在nib文件中图片可以正常显示。

当run起了的时候会提示Could not load the "XXX" image referenced from a nib in the bundle with identifier XXX

排查

右键Products中的主工程,show in  finder,显示包内容。确认打包后的app中包含xxx.bundle.

右键xxx.bundle显示包内容。发现所有的图片都被变成了.tiff格式。

解决

bundle target => build setting =>COMBINE_HIDPI_IMAGES 从YES设置成NO即可

 

 

转载请注明:天狐博客 » Bundle打包Could not load the "XXX" image referenced from a nib in the bundle with identifier XXX

微信 OR 支付宝 扫描二维码
为天狐 打赏
非常感谢你的支持,哥会继续努力!
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址