开发者

How can you randomize the splash screen?

开发者 https://www.devze.com 2022-12-25 03:14 出处:网络
Is it possible to make the iphone app spla开发者_运维技巧sh screen pick up a random image or text? So that it is different every time (e.g. display tips)? If so how?This is not possible. The Default.p

Is it possible to make the iphone app spla开发者_运维技巧sh screen pick up a random image or text? So that it is different every time (e.g. display tips)? If so how?


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.)


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消