How to make the iOS splash screen stay a long time

Source: Internet
Author: User

Several methods:

Method 1:
Write it in the APPDELEGATE.M.

-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (nsdictionary *) launchOptions
{

[Nsthread sleepfortimeinterval:2.0];
[_window makekeyandvisible];

Override point for customization after application launch.
return YES;
}

Method 2:
Timer, thread can be delayed
1, if the data is static, the start page wants to let the user see clearly, then sleep delay is the simplest method.
2, if it is to dynamically display the loading progress, application information, the word definition view, delay disappears.

Method 3:
iphone Development Implementation splash screen is very simple, make a full screen welcome page picture, name it default.png, and then put in the Xcode project resource inside.
In the XXXAPPDELEGATE.M program, insert the following code:
-(BOOL) Application: (uiapplication*) application
Didfinishlaunchingwithoptions: (nsdictionary *) launchoptions {
–inserta delay of 5 seconds before the splash screendisappears–
[Nsthread sleepfortimeinterval:5.0];
Override point for customization after applicationlaunch.
ADD The View controller ' s view to the window Anddisplay.
[WindowaddSubview:viewController.view];
[Windowmakekeyandvisible];
return YES;
}
This splash the page to stay 5 seconds later, disappeared.

How to make the iOS splash screen stay a long time

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.