参考链接:
http://arsenkin.com/launch_screen_image_cache.html
https://blog.csdn.net/qq_30932479/article/details/78689286
https://www.jianshu.com/p/c12246bd326d
3.
http://arsenkin.com/launch_screen_image_cache.html
https://blog.csdn.net/qq_30932479/article/details/78689286
https://www.jianshu.com/p/c12246bd326d
1.
Solution
Again, thanks to the thread I have referenced above I found a way to solve this issue - name your new image differently from the one there was before in case your new one has the same name as the old one and put it out of the *.xcassets folder to the project directory and reference it in your UIImageView . And that's it. Sound stupid easy but oh gawd how much rage I had.
2.
目前已知的可行办法是,启动图不要放在Assets.xcassets里边(放在Assets.xcassets里边如果更改了启动图Set的名字,会出现启动的时候白屏),启动图放到外边的文件夹下,并且每次更新启动图的时候使用不同的名字,这样每次更换启动图后就,启动的时候就会使用新的启动图。
如果之前使用的是LaunchScreen,之后换成LaunchImage,那LaunchImage设置的启动图一定是无效的,因为LaunchScreen的优先级高于LaunchImage,没有什么好的解决办法,除非删应用,重启,重装应用。
如果之前使用的是LaunchScreen,之后换成LaunchImage,那LaunchImage设置的启动图一定是无效的,因为LaunchScreen的优先级高于LaunchImage,没有什么好的解决办法,除非删应用,重启,重装应用。
3.
项目里使用的Launch Screen来设置启动图,在原来的基础上更换了一张图片后运行发现启动图没有更新成功,在网上找了两天,总结一下:
1,使用Launch Screen这种方式设置启动图后,再转换成images.xcassets方式设置新的,启动页不会更改。
2,使用images.xcassets这种方式设置启动图后,再转换成Launch Screen方式设置新的,启动页会更改,看来Launch Screen优先级比较高。
3,在Launch Screen上直接更换图片,如果更换不成功(都说是苹果的bug,换了图没有更新是系统有缓存,没有把老图片替换。),把图片名字改了试试。
4,在Launch Screen上直接更换图片,如果更换不成功,删除原先的在Launch Screen.storyboard创建一个新的,添加UIImageView和约束,添加图片,注意:图片名称还得换成新的。
5,设置图片时,要把图片放在文件根目录下,不然也会出现加载不出来的情况。
以上这些基本可以解决了。
评论
发表评论