gpt4 book ai didi

ios - Assets 目录未在项目中使用

转载 作者:技术小花猫 更新时间:2023-10-29 11:08:45 25 4
gpt4 key购买 nike

我有一个使用 Assets 目录的项目,最近我没有做任何更改,图像只是不显示。它显示此错误:

2014-06-23 21:41:02.824 Project[8247:464100] CUICatalog: Can't find rendition for name: menu scale factor: 2 device idiom: 1 device subtype: 568
2014-06-23 21:41:02.825 Project[8247:464100] Could not load the "image" image referenced from a nib in the bundle with identifier "com.sieradzki.Project"

我知道这里已经回答了这个问题: Asset Catalog Error: CUICatalog: Can't find rendition for name但解决方案是使用 Cocoapods,但我根本没有在我的项目中使用 Cocoapods,我什至没有在我的 Mac 上安装它。

最佳答案

我过去遇到过这种情况,一直是因为我在为 iPhone 和 iPad 使用图像时将图像集设置为“设备特定”而不是“通用”。

例如,如果您在名称中使用“~iphone”并拖入 Assets 目录,它将自动设置为“设备特定”并选择“iPhone”。然后,当您在 iPad 上加载时,它可能会仍然抓取该图像(因为这是 Xcode 对您想要的内容的最佳猜测),但会发出警告,说它找不到 iPad 图像。将图像集切换为通用可解决此问题。

我敢打赌你有完全相同的问题,但你用“~ipad”做到了。

关于ios - Assets 目录未在项目中使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24375863/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com