IOS: multiple launch images

Is it possible to provide multiple startup images, and not just one Default.png startup image? My goal is that you have, for example, 5 different launch images, and for each application launch this shows another one.

Just in case someone answers this, I know that it is possible to have different launch images for different configurations (for example, screen orientation). But that is not what I am looking for. I would like to have different startup images for exactly the same configuration, with the only variable being the startup time.

+4
source share
3 answers

Judging by this link , I do not think this is possible. You have latitude in setting up different launch images for custom URL schemes or even for localizing them, but other than that, since they are specified in the .plist file, so that iOS processes them quickly before your application processes, which is also latitude how do you get ...

+4
source

Rumor has it that you can download the default image from the Document folder:

  • set the path to ../Document/Default.png
  • each time you launch the application, override Default.png with one of your predefined images
  • * at first start up, the start screen will be black

PS. I have not tried, so I can’t say that this works. And even if it works, you may encounter problems with the Apple review process.

+2
source

It would be possible if you embed your launch images using javascript / jquery and embed plain HTML.

In your script, you need to specify the logic of which splash screen to use 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 should add some variable to the image name. So if this time, you will have

  landscape-Morning.jpg landscape-Noon.jpg landscape-TeaTime.jpg landscape-Evening.jpg 

The same goes for other images.

I have not tried this, but since you can use javscript to set the image to be displayed depending on the orientation, it should not be a problem to establish which image depends on the time of day.

-1
source

Source: https://habr.com/ru/post/1401628/


All Articles