如果在LaunchScreen.storyboard上使用该图像,则该图像在更改时不会更新 [英] Image does not update when changed if that image is used on LaunchScreen.storyboard

查看:726
本文介绍了如果在LaunchScreen.storyboard上使用该图像,则该图像在更改时不会更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,此问题与SO上的其他类似问题无关,因为此问题涉及使用LaunchScreen.storyboard,而SO上提供的解决方案无法解决此问题.

First of all this question has nothing to do with other similar questions on SO because this problem involves using LaunchScreen.storyboard and the solutions presented on SO don't solve this problem.

我正在LaunchScreen.storyboard中使用图像.我更改该图像,并且每次应用启动时都会显示旧图像.我尝试过的事情:

I am using an image inside LaunchScreen.storyboard. I change that image and every time the app starts it shows the old image. Things I have tried:

  1. 每次给图片命名不同
  2. 删除derivedData内容
  3. 将图像从Assets文件移到外部
  4. 产品>清洁
  5. 从设备上删除应用.
  6. 执行1-4的所有操作,然后退出并重新启动Xcode.

这太神奇了,但没有任何效果.除了伏都教徒,我已经尝试了一切.

It is amazing but nothing works. I have tried everything except voodoo.

以上技术似乎适用于其他地方使用的图像,但不适用于LaunchScreen.storyboard使用的图像.

The techniques above seem to work for images used elsewhere but not for images used by LaunchScreen.storyboard.

我正在设备上运行它.

有什么想法吗?

推荐答案

可能的问题是Springboard按捆绑包ID缓存了启动映像.要强制重建,必需的步骤是

The likely problem is that Springboard caches the launch image by bundle ID. To force a rebuild, the necessary steps are

  1. 从设备中删除应用.
  2. 重新启动设备.
  3. 安装并运行应用.

但是,到目前为止似乎确实存在未定义的完全故障案例.如果以上暴力破解方法无法正常工作,请查看以下Radar归档文件: UIImageView在设备的启动屏幕中缺少图像似乎描述了永久性缓存失败.在这种情况下,更改您的捆绑包ID并查看是否显示了所需的图像,这就是您剩下的全部内容.

However, there does appear to be a so far undefined complete failure case. If the above brute force method fails to work, take a look at this Radar filing: UIImageView missing images in Launch Screen on device which appears to describe a permanent caching failure. In that case, changing your bundle ID and seeing if the expected image shows up is about all you've got left.

这篇关于如果在LaunchScreen.storyboard上使用该图像,则该图像在更改时不会更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆