问题
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