Most apps display a background image in full screen during startup, such as Sina Weibo showing this one:
To achieve this in iOS, no pressure, very simple, the need to display the full-screen image default.png, the iOS app will be launched by default to load and full-screen display default.png.
You can also name pictures with other names, and configure them in Info.plist:
Once configured, the app will load and display full screen when it starts lufy.png
By default, the app is not really "full screen" when the default.png is displayed, because the top status bar is not hidden, such as the following effect:
In most cases, we want to hide the status bar so that the default.png is really full screen.
When it comes to this, someone might immediately think of a way: Add the following code to the Appdelegate application:didfinishlaunchingwithoptions: Method:
I can only say that your thinking is right, but actually do not achieve the desired effect, you will find the display default.png when the status bar is still there, and so on default.png display, the status bar is hidden.
Let me explain why this method is not feasible, in fact the reason is very simple:
1> Default.png is loaded during app startup, not after the app is launched
2> appdelegate Application:didfinishlaunchingwithoptions: The method is called after the app has been started.
Here's a solution to add a configuration to the Info.plist:
The yes here indicates that the status bar is hidden when the app is initialized (launched).
Of course, the status bar is still hidden after the default.png is displayed. If you want to re-display the status bar, fill in the following code:
[UIApplication Sharedapplication].statusbarhidden = NO;
How do I start the app full screen default.png (picture)?