I am trying to set time for the launchscreen.xib to make it last longer, for example 5 sec,since by default it disappears too quick i searched the web but found nothing useful, can it be done ? Thanks
-
1Don't do this. Be happy that your app launches fast. People want to use your app, they don't want to see your fancy splash screen. – Matthias Bauch Jan 27 '15 at 12:06
-
That is Probably True ... – jack Jan 28 '15 at 19:06
3 Answers
The apple documentation mentions this:
A launch file or image provides a simple placeholder image that iOS displays when your app starts up. The placeholder image gives users the impression that your app is fast and responsive because it appears instantly and is quickly replaced by the first screen of your app.
So essentially the launch screen cannot be made last longer because its only displayed when the app is starting up.
Still if you want you can
- create a custom
UIView
with the launch image - make it the Initial View Controller by dropping the arrow in storyboard to your custom UIView
- present your main View Controller on top of the launch image view after
x
seconds usingdispatch_after
You can add this in your app delegate:
float delay =5.0;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[NSThread sleepForTimeInterval:delay];
}

- 11,839
- 9
- 58
- 91

- 777
- 6
- 20
-
I believe Apple will reject your app if the initial lunch image stays on screen longer then it should so this whilst it might work is incorrect – Popeye Jan 27 '15 at 12:11
-
They won't reject it for that, but it's a poor experience regardless. – Gary Riches Jan 27 '15 at 12:32
-
Splash screens are intended to have a delay by design. My published apps have always utilized Splash Screens for brand awareness. – Native_Mobile_Arch_Dev Jan 27 '15 at 12:45
-
and Your way is working just fine, however will it cause my app to be rejected by apple upon uploading to app store ? as mentioned by @Popeye ? – jack Jan 28 '15 at 19:10
-
@Jack not at all. For almost five years, I have developed published apps on the app store which utilize Splash Screens. – Native_Mobile_Arch_Dev Jan 29 '15 at 13:13
-
If you use a viewController, you can present it again in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
making it the UIWindow
's rootViewController
, or presenting it modally from your application in the same method. This way, you can customize its dismissal. You can also add some animation to this viewController
So it may be another viewController than your launchScreen.

- 11,746
- 5
- 36
- 42