-1

I know this question has been asked and answered many times but i'm not sure where to put the code at the right place.

- (void) applicationDidFinishLaunching:(UIApplication*)application
{
    [NSThread sleepForTimeInterval:5.0];
}
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
sann chhailong
  • 53
  • 2
  • 10
  • 1
    http://stackoverflow.com/a/12725105/1342266 – kb920 Feb 14 '17 at 10:59
  • under **didFinishLaunchingWithOptions** set `sleep(0.5);` change the float value as per you want – Antony Raphel Feb 14 '17 at 12:35
  • Why would you want to do this? Apps that don't launch in a timely manner can be rejected by Apple. Also, how does showing a splash screen they're not likely to care about serve the user? – John Parker Feb 14 '17 at 14:31

2 Answers2

0

You can create a UIView containing your splash screen content and display it in the initial view controller. When you finish processing whatever you want to process, just hide this UIView or remove it totally.

Ali
  • 497
  • 1
  • 4
  • 16
-1

You have to put

[NSThread sleepForTimeInterval:5.0]

in

 applicationDidFinishLaunching

method of appDelegate.swift file

Sarabjit Singh
  • 1,814
  • 1
  • 17
  • 28
Ram
  • 961
  • 6
  • 14