Why does IOS display default.png (image) on the full screen when the append is started ),

Source: Internet
Author: User

Why does IOS display default.png (image) on the full screen when the append is started ),

Most apps display a background image in full screen during startup. For example, Sina Weibo displays this image:

 

To realize this effect in iOS, you can simply name the full-screen display image default.png without any pressure. When iOS appstarts, the image will be downloaded and the full-screen display of default.png will be displayed.

You can also name the image with another name, and configure it in Info. plist:

 

After the configuration is completed, the appstart will go to the terminal and display lufy.png on the screen

When the app displays default.png, it is not really "full screen" because the status bar on the top is not hidden, for example, the following effect:

 

We all want to hide the state bar so that default.png can be displayed in full screen.

At this point, someone may come up with a method: Add the following code to the application: didfinishlaunchingwitexceptions: Method of AppDelegate:

[UIApplication sharedApplication].statusBarHidden = YES; 

The status bar is hidden only after the listener is displayed.

Let me explain why this method is not feasible. The reason is actually very simple:

1> Default.png is loaded during app startup, not after app startup.

2> application: didfinishlaunchingwitexceptions of AppDelegate: The method is called only after the app is started.

The following describes the solution. Add a configuration in Info. plist:

 

YES indicates that the status bar is hidden during app initialization (startup.

Of course, the status bar is hidden after default.png is displayed. To re-display the status bar, add the following code:

[UIApplication sharedApplication].statusBarHidden = NO; 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.