iOS: Update launch screen dynamically

狂风中的少年 提交于 2020-01-11 08:32:07

问题


I've designed a launch screen using story board. It's supposed to have 3 images. 2 of these are static, where as, i need to update one at run time (after downloading that from server).

My understanding is that we can not add code for launch screen as there is no controller for this at backend.

What i want to do is to use some default place-holder for the first time. Download & cache that dynamic image at some other point in application. And when user use the app for the 2nd time, show the cached image.

Any solution? Can i update xcassets at run time? Or can i update the image using keypath?

Update: Just found that launch screen and splash screen are 2 different things (Link). Adding content in launch screen dynamically is not possible. Whereas, using splash screen (without any need) is not recommended.


回答1:


This is not possible, the story board used at launch time is in the main bundle of the application which is readonly and can not be changed.

Also you (edit) can't run any code on startup, since your app is not running.



来源:https://stackoverflow.com/questions/41892355/ios-update-launch-screen-dynamically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!