In a new Xcode 6 project, a default LaunchScreen.xib
file is created that is displayed for a brief time when the app starts. How can I alter the time of the display e.g. display it for 5 seconds?
Asked
Active
Viewed 1.1k times
2

Ketan
- 123
- 1
- 1
- 10
-
you mean like this topic I think http://stackoverflow.com/questions/7511353/change-iphone-splash-screen-time – LoGoCSE Nov 25 '14 at 09:10
-
Create custom splash screen. – Hari Babu Nov 25 '14 at 12:04
1 Answers
9
You can also use NSThread
:
[NSThread sleepForTimeInterval:(NSTimeInterval)];
You can put this code in to first line of applicationDidFinishLaunching
method.
For example, display screen for 4 seconds.
File: AppDelegate.m
- (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:4]; //add 4 seconds longer.
//other code....
}

RckLN
- 4,272
- 4
- 30
- 34
-
1I was looking for some settings in Xcode. But this works as well! Thanks! – Ketan May 13 '15 at 13:14
-