Is it possible to provide multiple launch images instead of just one Default.png launch image? My goal is, that you have for example 5 different launch images and for every application start it shows another one.
Just in case someone responds with that, I know that there is the possibility to have different launch images for different configurations (e.g. screen orientation). But that's not what I'm looking for. I'd like to have different launch images for exactly the same configuration, with the only variable different being the time of the launch.
Judging from this link, I don't believe it's possible. You have some latitude in configuring different launch images for Custom URL Schemes or even to localize them, but other than that, since they are specified in the .plist file so that iOS handles them quickly before your app is processing, that's as much latitude as you get...
There are rumors that it's possible to load default image from Document
folder:
- set path in info.plist
../Document/Default.png
- on each app launch override that
Default.png
with one of your predefined images - *on first launch the start-up screen will be black
PS. I didn't try it, so can't say that it works. And even if it works you can meet problems with Apple review process.
Would be possible if you would insert your launch images using javascript/jquery vs. entering plain HTML.
In your script you would have to specify your logic for what splash screen should be used when. Then use this:
<script type="text/javascript">
(function() {
var a;
if(navigator.platform==="iPad"){
a = window.orientation === 90 || window.orientation === -90 ?
"landscape.jpg":"portrait.jpg"
} else {
a = window.devicePixelRatio === 2 ?
"retina.jpg" : "startup.jpg"
}
document.write('<link rel="apple-touch-startup-image" href="'+a+'"/>')
})()
</script>
Your logic would have to add some variable to the images name. So if it's time, you will have
landscape-Morning.jpg
landscape-Noon.jpg
landscape-TeaTime.jpg
landscape-Evening.jpg
Same for the other images.
Haven't tried this but since you can use javscript to set which image to be displayed depending on orientation it shouldn't be a problem to set which image depending on time of day.
来源:https://stackoverflow.com/questions/9722357/ios-multiple-launch-images