XiLei
XiLei

Reputation: 11

How can you randomize the splash screen?

Is it possible to make the iphone app splash screen pick up a random image or text? So that it is different every time (e.g. display tips)? If so how?

Upvotes: 1

Views: 424

Answers (2)

Rayfleck
Rayfleck

Reputation: 12106

It is true that you cannot alter the splash screen, but you can present a view with whatever you want in it. Don't include a Default.png image in the bundle. Then in your app delegate, instantiate a view controller and add it's view as a subview to self.window. Then you need to dismiss this view, either based on a timer, or the completion of your startup processing, or a user tap, etc.

It is worth noting that Apple discourages using a splash screen, and recommends that you just get the UI up and working as fast as possible. If you must have a splash screen, you can display something that looks like your working app to create the illusion of a responsive UI, and remove that as soon as your UI really is responding.

Upvotes: 0

fbrereto
fbrereto

Reputation: 35935

This is not possible. The Default.png file in your application is always the "splash screen". To try and alter it after the application has been built would alter the signature of your application, and it would not launch the next time it was run. (Assuming you can write to files within your application bundle, which I have not tried.)

Upvotes: 3

Related Questions