Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change iPhone splash screen time [duplicate]

How would I make the splash screen stay for longer, 5 seconds, for example?

like image 544
iOS developer Avatar asked Sep 22 '11 07:09

iOS developer


People also ask

How do I set the time on my splash screen?

you can use Sleep method like this in your Splash Activity onCreate method: Thread timer1 = new Thread(){ @Override public void run(){ try{ sleep(4000); } catch (InterruptedException e){ e. printStackTrace(); } finally{ Intent intent = new Intent(SplashActivity. this, NextActivity.

What is splash screen in iOS?

Splash screen is commonly found in iOS apps, as well as, other desktop applications. This is the first screen you see when launching an application. Usually, splash screen is an image covering the entire screen and disappears after the main screen is loaded.

How do I create a launch screen in SwiftUI?

Adding a Launch Screen In SwiftUI projects, the launch screen is not generated by default. You need to add it manually in the Info. plist file. After opening the file, you should see an entry named Launch Screen.


2 Answers

Write sleep(5.0) in your

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method.

like image 120
Dhara Avatar answered Sep 22 '22 00:09

Dhara


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

  /*this will pause main thread for x interval seconds. 
  put on the top of application:didFinishLaunchingWithOptions, so it will not 
  proceed to show window until sleep interval is finished.*/

    [NSThread sleepForTimeInterval:5]; //add 5 seconds longer.
   //other code....
}
like image 39
HelmiB Avatar answered Sep 22 '22 00:09

HelmiB