【问题标题】:Assets don't load on iOS8 but they do in iOS9资产不会在 iOS8 上加载,但在 iOS9 上会加载
【发布时间】:2016-03-17 15:32:32
【问题描述】:

我目前正在开发一个需要支持 iOS8 和 iOS9 的应用程序。 该应用程序正在使用带有 Xcode 7.2.1 的 Swift 2 开发。

当我在 iOS9 上运行该应用程序时,无论是在模拟器上还是在设备上,一切都完美流畅。

但是当我在 iOS8(Sim 或 Device)上运行它时,我的任何资产都在加载,我在控制台中收到此错误。

-[CUIThemeRendition newImageFromCSIDataSlice:ofBitmap: usingColorspace:] Unsupported pixel format in CSI got 4
Unable to create unsliced image from csi bitmap data

我所有的资产都位于 AssetCatalog 中,它们都是 .png

【问题讨论】:

标签: ios xcode swift


【解决方案1】:

我终于找到了这个问题的答案。基本上这是因为您在 Asset Catalog Compiler 选项中将 Optimization 字段设置为属性保存,将其设置为 nil 并且它可以工作!

【讨论】:

    【解决方案2】:

    查看这些问题:

    Image resources for iOS

    Why does resource bundle copy .png as .tiff images?

    对我有用的简短答案是: 在你的捆绑目标转到,

    Bud Settings > COMBINE_HIDPI_IMAGES 并设置为 NO

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多