Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically change splash screen in iOS?

I am currently trying to figure out how to change the splash screen (default png) in iOS.

From what I understand, the ideal way to present an application to the user at the very beginning is to have the launch image a skeletal representation of the UI elements in the app (like this: http://h.dropcanvas.com/u90tr/IMG_0388.png).

Now, in my application, when I switch tabs and go to another app or the home screen, when I return to the application, the splash image is no longer relevant to that particular tab.

Ideally, what I would like to do is programmatically change the launch image in applicationDidEnterBackground so I can present a relevant splash screen when returning to the application.

Many thanks for your help!

like image 918
user1560387 Avatar asked Dec 20 '22 11:12

user1560387


1 Answers

You can't do this, and shouldn't need to bother. The launch image (it is NOT a splash screen!) is only used when your application is launched from scratch. If its just been into the background, the OS will take its own snapshot and use that when you return to the app.

Your launch image therefore only needs to show a basic representation of your app as it will appear when launched from scratch. If you have a tab bar, it shouldn't show any icons or labels (as they can change with localisation) - literally just the black glossy background, all the way across. In your link, I would lose the bar button item, for example.

If you can't make a representative image, a plain black image (or no image at all) would be best.

like image 85
jrturton Avatar answered Jan 14 '23 03:01

jrturton