iOS: Multiple launch images

我与影子孤独终老i 提交于 2019-12-03 03:52:34

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.

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