简体   繁体   English

iOS:LaunchScreen.storyboard上的新图像未显示更新应用

[英]iOS: new image on LaunchScreen.storyboard not showing updating app

this is my problem. 这是我的问题。

I have an app with version v1.0.0. 我有一个版本为v1.0.0的应用程序。 I have built a splash screen from Storyboard, its name is LaunchScreen.storyboard and it has three elements: a background image, a header image and a footer image. 我已经从Storyboard构建了一个启动画面,它的名称是LaunchScreen.storyboard ,它有三个元素:背景图像, 标题图像和页脚图像。 In the General Settings into the Project, in "App Icons and Launch Images" section, in subsection "Launch Screen File" is set like "LaunchScreen". 在项目的常规设置中,在“应用程序图标和启动图像”部分的“启动屏幕文件”子部分中设置为“LaunchScreen”。 it works perfect! 它完美无瑕!

Well, in this new version (v1.1.0) I had to replace the first image of header image for another one in png. 好吧,在这个新版本(v1.1.0)中,我不得不在png中替换另一个头图像的第一个图像。 So, when I simulate the update app process (Run app v1.0.0, then run app v1.1.0), and every element show but header image not. 因此,当我模拟更新应用程序进程(运行应用程序v1.0.0,然后运行app v1.1.0)时,每个元素都会显示,但标题图像不会显示。 If I uninstall the v1.0.0 app and install app v1.1.0 is not showing the new image. 如果我卸载v1.0.0应用程序并安装app v1.1.0未显示新图像。 The only way that I can see the new image in app update process is if I refresh the device (long press Home button + Power Button until restart device) and install directly the version v1.1.0. 我可以在应用更新过程中看到新图像的唯一方法是刷新设备(长按主页按钮+电源按钮直到重启设备)并直接安装版本v1.1.0。

I need to show this new header image in that app update process. 我需要在该应用更新过程中显示这个新的标题图像。 Anyone have idea or a solution for that? 有人有想法或解决方案吗? or if is a bug of iOS anyone know the oficial reference to justify this? 或者如果是iOS的错误,任何人都知道官方参考来证明这一点吗?

Thanks! 谢谢!

I have noticed the same behavior in Xcode 8.2.1: After editing a subImage superimposed on a launchScreen storyboard, the modified subImage does not get reflected in subsequent app runs, either in the sim or on a physical device. 我注意到Xcode 8.2.1中的相同行为:编辑叠加在launchScreen故事板上的子图像后,修改后的子图像不会反映在后续应用程序运行中,无论是在sim中还是在物理设备上。 Rebooting the sim sometimes works, sometimes I have to delete the subImage, rename it (because just re adding it in Interface Builder does not do the trick) and then replace it with IB. 重新启动sim有时会起作用,有时我必须删除subImage,重命名它(因为只是在Interface Builder中重新添加它不能解决问题)然后用IB替换它。

I chalk this up to an Xcode bug. 我将其归结为Xcode错误。

It is probably a cached image for which the rules regarding flushing that cache are not disclosed. 它可能是一个缓存的图像,其中没有公开关于刷新缓存的规则。 It would be very nice the system would recognize that the data changed and a new image should be cached. 系统会识别数据已更改并应缓存新图像,这将是非常好的。 This applies to be sim and to physical devices. 这适用于sim和物理设备。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM