Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Displaying splash screen for longer than default seconds

Is it possible to display the Default.png for a specified number of seconds? I have a client that wants the splash screen displayed for longer than its current time.

They would like it displayed for 2 - 3 seconds.

like image 301
fulvio Avatar asked Apr 11 '11 07:04

fulvio


People also ask

How do you set a timer for 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.

What is difference between splash screen and launch screen?

Splash Screen is the very first screen the user sees when they open up an app on a mobile device. It's the very first chance of creating a positive impact on the users. It appears while the app is loading when the user has just opened up the app. Many times the Splash screen is called a launch screen.

Is splash screen mandatory IOS?

splash screen is necessary to be added in xcode rather than an image as first page. Heard that splash/Launch images are necessary for ios apps,otherwise it will be rejected. I have included splash screen as the starting page background image with a delay of 2 seconds.


2 Answers

No, the default.png is shown while your app starts up.

You can add a new viewcontroller which will display the default.png in the application didFinishLoading.

This way you display the default.png a bit longer.

You should only show the default.png if you are loading data, which could take some time. As the appstore guidelines state, you should not delay starting of you are any longer than necessary.

like image 126
rckoenes Avatar answered Sep 21 '22 12:09

rckoenes


You can also use NSThread:

[NSThread sleepForTimeInterval:(NSTimeInterval)]; 

You can put this code in to first line of applicationDidFinishLaunching method.

For example, display default.png for 5 seconds.

- (void) applicationDidFinishLaunching:(UIApplication*)application {    [NSThread sleepForTimeInterval:5.0]; } 
like image 42
Chetan Bhalara Avatar answered Sep 23 '22 12:09

Chetan Bhalara