im using a Default.png file for my iPad-app. It appears correctly but i could'nt find a way to modify the duration of the splash screen. Has somebody any suggestions? Google has many sites that show how to setup the startscreen but could'nt find a solution for my problem.
7 Answers
The first rule of Human Interface Guidelines for Splash Screens is: don't use splash screens. The second rule is: don't use splash screens!:
Supply a launch image to improve user experience.
Avoid using your launch image as an opportunity to provide:
An “application entry experience,” such as a splash screen
An About window
Branding elements, unless they are a static part of your application’s first screen
If you absolutely must include a long-duration splash screen, and have darn good reasons for doing so, the usual approach is to throw up a UIImageView
containing a copy of you launch image in, e.g., application:didFinishLaunchingWithOptions:
- which should provide the illusion of a lengthy splash screen.
But please don't.

- 3,156
- 1
- 34
- 44

- 8,748
- 2
- 31
- 33
-
4`[NSThread sleepForTimeInterval:2.0];`in `application:didFinishLaunchingWithOptions:` did work for me. – 0x90 Apr 04 '12 at 09:21
-
4No, put up an image view instead! Apple reserves the right to change the kernel watchdog interval at any time. By sleeping your main thread you are greatly increasing the likelihood that your app will crash/be killed automatically. – Conrad Shultz Apr 04 '12 at 16:19
Using a "splash screen" (Logo, etc) is not the idea of the Default.png!
Read the HIG from Apple.
The (splash) screen (named loading screen) is not for a Logo showing or something like this. When having multitasking enabled, the "splash screen" shows up really rare. The splash screen should, like the apple apps does, only show the interface coming up in the first application screen without any localized strings, etc.
Also keep in mind: The faster the iOS Device get, the shorter you can see the Default.png. So avoid using it for any important CI/CD content.

- 9,965
- 3
- 48
- 60
The Default image is displayed while the app is loading and will be dismissed as soon as the app is ready. And there is no API to control that duration.

- 27,436
- 3
- 68
- 83
You can't technically modify the duration that the "Default" image stays there; it is designed to just be a temporary image "foreshadowing" the app actually starting up and isn't specifically designed as a splash screen.
I recommend that you keep the "splash screen effect" by adding an image view to the screen as the app starts in the -application:didFinishLaunchingWithOptions: method. You can then set a timer which calls a method to animate the splash off after the designated time you want it to be. It will be there for a little longer than you specify depending on how long it actually took the app to load up, but it will give the effect you're after.
You can set the image view's image to [UIImage imageNamed:@"Default"] and it will access that Default artwork for you.

- 565
- 2
- 8
You can't change the duration. If you want it be shown longer though, you can add the same image to a view that you show while you're loading your data!

- 2,515
- 1
- 19
- 36
There is a good blog post here on how to create a splash screen using a UIImageView
with a timer:
http://nullpointr.wordpress.com/2012/02/19/iphone-dev-how-to-implement-a-splash-screen/
Useful for beginners, who are still learning the best way to do things in iOS.

- 9,028
- 6
- 63
- 85
As @Conrad Shultz answered, splash screen should be used only via the supplied LaunchScreen.storyboard
file by Xcode.
However, in rare situations you do want to prolong the splash screen:
- Download A LOT of files before the app starts since the app depends on them.
- Other reason...
This is the way to do it:
Inside AppDelegate
, under didFinishLaunchingWithOptions
you should:
- Create a VC that has the same splash image and the same constraints
- Present it
- Dismiss it after a given time
The code:
let splashVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "splash")
window?.makeKeyAndVisible()
if let root = window?.rootViewController
{
root.present(splashVC, animated: false, completion: nil)
let dispatchTime = DispatchTime.now() + 3
// didFinishLaunchingWithOptions will return and this block will be executed afterwards, hence, async..
DispatchQueue.main.asyncAfter(deadline: dispatchTime, execute: {
root.presentedViewController?.dismiss(animated: false, completion: nil)
})
}
}

- 4,687
- 1
- 47
- 57